Become a master of bundles
What Is Bundl?
Why Use Bundl?
- Build resoucres only when requested by your browser (and only if they've changed) (Example)
- Easily concat, require, and wrap all of your various resources to generate the bundle you really need (Example)
- Run other tasks like linting, file system operations, etc. (Example)
$ cd ~/myProject $ npm install bundl --save-dev
Create Your Build Script
Make a new file at
Run Your Script
$ cd ~/myProject $ node bundl --min
Run via NPM (optional)
Add scripts to your
$ npm run build
How to Use
Build Resources Live On-Demand!
When you make a change to one source file, you shouldn't have to switch back to command line to run a task before you can see your changes live in a browser. You also shouldn't need to wait for every bundle to rebuild if you only want to see one or two of them. Use Bundl's dev server instead...
// Setup a build pipelinevar myProjectBundl = targets bundlOptions;// Start live dev modemyProjectBundl;
Now, open a browser to
HTTP Requests for a bundled resource will check to see if any of the source files within this bundle have changed since last request. If so, the webserver will rebuild the requested bundle before sending it back to the browser.
Learn how to configure a devserver for your project
--verbose as a command line option to print more info about what's happening
$ node bundl --verbose
.debug() to your build chain to print which src files will be bundled into which dest files
new Bundl(targets, bundlOptions).debug();