browserify-banner
Add a comment (and/or code) to the top of your Browserify bundle
Installation
Install using npm. Add the -g flag to install globally so you can use it from any terminal.
npm install -g @jsdevtools/globify
Usage
The command-line interface is identical to browserify and watchify. In fact, globify simply passes your arguments straight to browserify or watchify (after expanding the glob pattern).
globify <entry files glob> [options]Options: <entry files glob> Glob pattern of entry files. Don't forget to wrap the glob pattern in quotes, otherwise some shells (like bash) will pre-expand the glob. --outfile=FILE, -o FILE If outfile is a file, then a single bundle will be created. If it's a directory, then separate bundles will be created for each entry file. You can also specify an output filename pattern, like *.bundled.js --exclude=GLOB, -u GLOB Excludes files that are matched by the <entry files glob> --watch, -w Call watchify instead of browserify.
Examples
For all of these examples, assume that we have a file structure like this:
Multiple files, multiple bundles with customized names
We want to create separate bundle files for each of the three entry files, but we weant each bundle file to have a .bundled.js suffix. We can do that with the following command:
Now, let's try it with watchify instead. Let's also add some extra options, and run the uglifyify transforms to minify the bundles. And let's give the bundles a .bundled.min.js suffix.
To build/test the project locally on your computer:
Clone this repo git clone https://github.com/JS-DevTools/globify.git
Install dependencies npm install
Run the tests npm test
License
Globify is 100% free and open-source, under the MIT license. Use it however you want.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Big Thanks To
Thanks to these awesome companies for their support of Open Source developers ❤