lessish

Less middleware for connect

lessish

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

npm install lessish
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,
    watchCallbackfunction(errorfilename) {
        // 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
}))

zlib license LICENSE.

Based on the work of marcello3d in stylish