collate.js: Concatenate and minify .js/.coffee and .css/.less

collate.js: Concatenate and minify .js/.coffee and .css/.less – collate.js is an open source Node.js module and command line utility for concatenating and minifying .js/.coffee and .css/.less.

At Ost we use collate on our dev machines to watch our client-side scripts and styles and reconcatenate them into a single client.js and styles.css whenever we make a change.

On the server we recommend configuring collate to run via git hook on pushes.

We use browserify for Node-style require in our client code, and collate works just fine on top of it.

We evaluated two other packages before building collate: connect-assetmanager and Buildr.

connect-assetmanager works well but slows down server boot times.

Buildr has a lot of great features, but it takes a more monolithic approach (only one .js/.css output combo at a time) and its CLI isn’t functional at the moment.

Your needs may differ from ours and both packages are worth evaluating alongside collate.

Check out our source on GitHub for installation and usage.