cocat
Node module for asynchronous CSS file concatenation
Last updated 7 years ago .
Repository · Original npm · Tarball · package.json
$ cnpm install cocat 
SYNC missed versions from official npm registry.

Cocat

Node module for asynchronous CSS file concatenation. Looks for @import statements and replaces them with the actual content of the file if it exists, otherwise it just leaves the @import statement as-is.

Usage

Use it in your scripts by specifying a file

Cocat = require('cocat');
Cocat.concat({
  filename: 'path_to_file.css'
}, (err, output) {
  ...
});

Or by specifying a string and a path to use instead

Cocat = require('cocat');
Cocat.concat({
  content: '/* CSS GOES HERE */'
  path:    '../foo/bar/'
}, (err, output) {
  ...
});

It also works great on the command line:

$ cocat [-hc] input.css [output.css]

Available options:

  -h, --help
    Show this help information.

  -c, --compile
    Compile the file, even if no output file is specified.
    E.g `cocat -c style.css` will save output to style.concat.css

Happy concatenating!

Current Tags

  • 0.2.0                                ...           latest (7 years ago)

3 Versions

  • 0.2.0                                ...           7 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |