Collate is a Node module for concatenating and minifying scripts and stylesheets. Collate works with JavaScript/CoffeeScript and CSS/LESS. The command line utility can watch for changes and automatically recollate. Collate is a project of State Design.
Install via NPM:
npm install collate
Use the -g flag for global access to the command line utility.
As a module:
Collate = require('collate');
Collate.collate('styles.css', ['main.less', 'home.css'], { basedir: 'styles/' });
From the command line:
collate -t styles.css -d styles/ main.less home.css
-t, --target Target for collated output. [required]
-d, --basedir Base dir (relative to cwd).
-c, --compress Minify the output. [boolean]
-v, --verbose Verbose - source changes and collate results print to STDOUT. [boolean]
-w, --watch Watch for changes (process will run until ^C). [boolean]
The module syntax is
Collate.collate([target], [sources], [options], [callback]);
- Option to gzip
- Don't reminify already-minified source