2.0.8 • Published 8 years ago
browserify-sa v2.0.8
browserify-sa
Run browserify-sa in a npm package and make a standalone build of the package.
Requirements
You will need a global install of browserify.
sudo npm install browserify -gInstall
sudo npm install browserify-sa -gUsage
Just run the command in the module you would like to make, like this:
browserify-saBasicly a simple wrapper around browserify that does something like this:
mkdir -p dist && browserify moduleMain -s moduleName > dist/module-name.jsThis makes a dist/module-name.js file based on the 'main' and 'name' fields in package.json
Options
If you want another name for the the exposed variable name, you can specify:
-n or --name the name of the export, the global variable exposed.
Uglify:
--uglify or -u - will shorten and uglify the dist build. Uglify will not always work with e.g. string literals.
In order to use uglify, you will need uglify.js installed global.
sudo npm install -g uglify-jsMIT © Dennis Iversen