3 ms·
Here is a browserify/watchify-based script I use for building a browser extension's JS bundles: https://github.com/ghostwords/chameleon/blob/master/tools/build.
by ghostwords 12y ago
Here is a browserify/watchify-based script I use for building a browser extension's JS bundles: https://github.com/ghostwords/chameleon/blob/master/tools/build.js https://github.com/ghostwords/chameleon/blob/master/tools/bu...
The script
- Creates multiple bundles, with Underscore template precompilation and source code minification (for some bundles).
- Converts every vendor library into shared modules (you don't want Underscore included in every bundle that needs it, but you want to be able to require() it in those bundles).
- Monitors your files for changes and recompiles bundles as needed when run with --watch.
I found working with Browserify a pleasant experience after RequireJS and r.js (its build tool).