buildjs

1.0.3 • Public • Published

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')();

Or if you use ExpressJS

app.configure('production', function () {
    require('buildjs')();
});

Then... that's all ;)

Package Sidebar

Install

npm i buildjs

Weekly Downloads

1

Version

1.0.3

License

none

Last publish

Collaborators

  • konteck