Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A nodejs module that minimize CSS files
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
example
lib
test
.gitignore
README.md
index.js
package.json

README.md

cssm

A node.js module that minimize CSS files. It uses a port of YUICompressor made in JavaScript by Stoyan Stefanov based on Isaac Schlueter work. For more informations about YUICompressor → https://github.com/yui/yuicompressor

Install

$ npm install cssm -g

Usage

Command line

$ cssm css/*.css -s -min -c gbk

Module

var CSSM = require( 'cssm' );
var cssList = [ 'a,css', 'b.css' ];  // Or, just use 'a.js' for single file.
var charset = 'gbk';
var suffix = '-min';

CSSM.compress({
    input: cssList,
    charset: charset,
    suffix: suffix
});

Help

use cssm --help to see all the params:

  Usage: cssm [options]

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -c, --charset [value]  The charset encoding to use when compress your file.
    -s, --suffix [value]   Suffix that the compressed file will be add.
Something went wrong with that request. Please try again.