/UglifyCSS

Yet another css minifier(compressor). Optimized for gzip with css properties sorted.

Primary LanguageJavaScript

UglifyCSS

Yet another css minifier(compressor). CSS properties are sorted for better gzip compress. After sorted, the file is about 1%~2% smaller with gzip.

For size comprare: see size.js

Usage

var minifier = require('../../');

// method
/**
 * @param buf {Buffer|String}
 * @param option {Object} optional 
 *         - charset: {String} default to utf-8
 *         - debug: {Boolean} when true only sort css property
 *
 * @return {Buffer} option.charset encoded buffer
 */
minifier.compress(buf, option);

TODO

  • keep the order of shorthand property and its individual properties