Streaming less compiler


npm install lessen

Lessen is a streaming less.js compiler, because I needed and couldn't find one. It is based on the less.js code, but exports a streamable interface.


File output is streamed, --yui-compress is enabled by default.

var lessen = require('lessen');
var lessc = new lessen.Compiler({
lessc.compile(function(errdata) {

###Alternate form

Instead of passing options object, just pass input name, output name, and callback. Only input name is required.

lessen.compile('in.less', console.log)


var options = {
lessen.createStream('butt.less', options).pipe(fs.createWriteStream('out.css'));