npm install bundy
|2||downloads in the last week|
|5||downloads in the last month|
|Version||0.1.1 last updated a year ago|
|Keywords||package, build, builder, bundle, release, compressor, minify, minifier, yui, gcc, google, closure, compiler|
$ cd [your working dir] $ npm install bundy
Create Bundy build file
bundy.js file in which you will describe the build process. It should at least contain the following:
var bundy = require('bundy'); // your build process here bundy.build(); // this always needs to be at the end of the file
The last line will tell Bundy to start processing what you told it do to.
Describing your build process
Bundy can do 3 tasks:
bundy.js([ 'src/lib/required.library.js', 'src/lib/required.library2.js', 'src/myplugin.core.js', 'src/myplugin.js' ], 'minified/myplugin.min.js');
This will concatenate and minify the four given files and save the result in
This will minify the given CSS file and save it in
YUI is used to minify the CSS and JVE is required to be able to use it.
bundy.css(), just like
bundy.js() can also accept array of files as 1st argument, in which case the files will be concatenated and minified.
bundy.copy([ 'src/img/sprite.png', 'firstname.lastname@example.org', 'src/img/spinner.gif', 'src/img/logo.png' ], 'minified/img/');
This will copy the given four files into
minified/img/ directory keeping the original file names.
You can also copy a single file and change its' name:
Or you can copy a single file and ommit its' file name in destination, in which case the original file name will be kept:
Once installed and created
bundy.js simply run it:
$ node bundy.js
var bundy = require('./lib/bundy'); bundy.js([ 'src/lib/crypto.md5.min.js', 'src/lib/jquery.ui.custom.min.js', 'src/lib/jquery.touchpunch.js', 'src/lib/jquery.tipsy.js', 'src/lib/jquery.simulate.js', 'src/acme.core.js', 'src/acme.gui.js', 'src/acme.widget.js' ], 'minified/acme.min.js'); bundy.copy('src/acme.config.js', 'minified/acme.config.js'); bundy.css([ 'src/lib/jquery.ui.custom.min.css', 'src/lib/jquery.tipsy.css', 'src/acme.css' ], 'minified/acme.min.css'); bundy.copy([ 'src/img/elements.png', 'email@example.com', 'src/img/icons.png', 'firstname.lastname@example.org', 'src/img/jquery.tipsy.small.gif', 'src/img/loader.gif' ], 'try/minified/img/'); bundy.build();
Bundy is using the following: