https://github.com/diversen/browserify-sa
Run browserify-sa in a npm package and make a standalone build of the package.
https://github.com/diversen/browserify-sa
browserify browserify-sa
Last synced: over 1 year ago
JSON representation
Run browserify-sa in a npm package and make a standalone build of the package.
- Host: GitHub
- URL: https://github.com/diversen/browserify-sa
- Owner: diversen
- Created: 2017-07-02T15:42:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T18:33:48.000Z (almost 9 years ago)
- Last Synced: 2024-04-25T05:42:20.650Z (about 2 years ago)
- Topics: browserify, browserify-sa
- Language: JavaScript
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 -g
## Install
sudo npm install browserify-sa -g
## Usage
Just run the command in the module you would like to make, like this:
browserify-sa
Basicly a simple wrapper around browserify that does something like this:
mkdir -p dist && browserify moduleMain -s moduleName > dist/module-name.js
This 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-js
MIT © [Dennis Iversen](https://github.com/diversen)