deno.land / x / sheetjs@v0.18.3 / demos / browserify

/demos/browserify
سەرچاوە
app.js4 KB
browserify.html2 KB
Makefile275 B
README.md901 B
xlsxworker.js403 B
.gitignore56 B

Browserify

The library is compatible with Browserify and should just work out of the box.

This demo uses the require form to expose the whole library, enabling client code to access the library with var XLSX = require('xlsx'). The JS code from the root demo was moved to a separate app.js script. That script is bundled:

browserify app.js > browserify.js
uglifyjs browserify.js > browserify.min.js

Worker Scripts

Browserify can also bundle worker scripts! Instead of using importScripts, the worker script should require the module:

-importScripts('dist/xlsx.full.min.js');
+var XLSX = require('xlsx');

The same process generates the worker script:

browserify xlsxworker.js > worker.js
uglifyjs worker.js > worker.min.js

Analytics

sheetjs

Version Info

Tagged at
2 years ago