Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.23 KB

README.md

File metadata and controls

39 lines (23 loc) · 1.23 KB

Collate

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.

Installation

Install via NPM:

npm install collate

Use the -g flag for global access to the command line utility.

Usage

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

Options

  -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]);

Todo

  • Option to gzip
  • Don't reminify already-minified source