Naturally Produced Modules
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    lessenpublic

    Lessen

    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.

    Example

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

    var lessen = require('lessen');
    var lessc = new lessen.Compiler({
      fileIn:'in.less',
      fileOut:'out.css',
      compress:false
    });
     
    lessc.compile(function(err, data) {
    });

    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)

    Streaming

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

    Keywords

    none

    install

    npm i lessen

    Downloadsweekly downloads

    9

    version

    0.0.7

    license

    none

    last publish

    collaborators

    • avatar