less middleware for express
JavaScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
Readme.md
index.js
package.json

Readme.md

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