Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (18 sloc) 575 Bytes


This node.js module is a streaming compressor for CSS. Unlike other CSS minifiers it works on a stream and is optimized for speed.


npm install ncss


var ncss = require('ncss');
var min = ncss('.selector { background: black; }');


ncss < input_file > output_file

Using ncss with Connect or Express

ncss also comes with middleware for connect. See examples for more advanced usage.

var pub = __dirname + '/public';
connect.createServer(ncss.middleware(pub), connect.static(pub)).listen(3000);
Jump to Line
Something went wrong with that request. Please try again.