buildjs
v1.0.3
Published
JS/CSS files compress/optimizer
Downloads
12
Maintainers
Readme
BuildJS
Use this tool to compress all your assets to single file eg. all.js.
Just include it into your Node.JS project as usual module.
How to use
Add build.json file to you app's root folder
{
"watch": true,
"compress": true,
"scripts": {
"output": "media/scripts/all.js",
"input": [
"media/scripts/jquery.min.js",
"media/scripts/jquery.tools.min.js",
"media/scripts/underscore.min.js",
"media/scripts/backbone.min.js",
"media/scripts/main.js"
]
},
"styles": {
"output": "media/styles/all.css",
"input": [
"media/styles/bootstrap.min.css",
"media/styles/main.css"
]
}
}
Then include BuildJS from your app.js
require('buildjs')(__dirname);
Or if you use ExpressJS
app.configure('production', function () {
require('buildjs')(__dirname);
});
Then... that's all ;)