lessish

Less middleware for connect

npm install lessish
4 downloads in the last week
8 downloads in the last month

lessish build status

Simple node.js lesscss middleware for connect (or express) that doesn't write files to disk.

Install

npm install lessish

Examples

app.use(lessish({
    src: __dirname + '/public',
    compress: true,
}))

By default, lessish watches files (and dependencies) for changes. You can add a callback to learn when a file changes:

app.use(lessish({
    src:__dirname + '/public',
    compress: true,
    watchCallback: function(error, filename) {
        // do something clever, like tell the client to reload css
    }
}))

For production use, turn caching on (this caches the computed css in memory and disables file watching):

app.use(lessish({
    src:__dirname + '/public',
    compress: true,
    cache: true
}))

License

zlib license LICENSE.

Contributors

Based on the work of marcello3d in stylish

npm loves you