Socket
Book a DemoInstallSign in
Socket

cocat

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cocat

Node module for asynchronous CSS file concatenation

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

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'
}, function(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/'
}, function(err, output) {
  // ...
});

It also works great on the command line:

Usage: cocat [options] input.css [output.css]

Options:

  -h, --help     output usage information
  -V, --version  output the version number
  -s, --save     save output to a file based on the inputfile name

Examples:

$ cocat bar.css          # concats and ouputs to stdout
$ cocat -s foo.css       # concats and saves to foo.concat.css
$ cocat baz.css qux.css  # concats and saves to qux.css

Happy concatenating!

FAQs

Package last updated on 16 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts