Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
LESS middleware built on compile-middleware
JavaScript CSS
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Compile-Middleware-LESS

LESS middleware built on compile-middleware.

Usage

var lessware = require('compile-mw-less');

app.use(lessware({
    filename  : /(?:\/styles\/)(.*)\.css/i, // Capture group 1 will be used
    src       : '/path/to/source',
    maxAge    : 86400                       // Optional, HTTP Cache Control MaxAge
    // Render Options to LESS Parser, Optional
    compress  : 'auto',
             // 'auto' will turn compress on compress when requested file 
             // ends with .min.css or -min.css
             // Other optional value are: true/false, default 'auto'
    yuicompress: false,                     // YUICompress, off by default
    optimization: 0,                        // Specify LESS optimize level
    dumpLineNumbers: 0,                     // LESS.js debug option
    paths     : []
             // Specify LESS include paths, src path will be added automatically
}));

Refer to compile-middleware#Usage for more information.

For information about less render options, please refer lesscss.org.

WARNING No not add a g flag to the RegExp, that will broke the filename extraction procedure. It's an V8 Issue

License

(The MIT License)

Something went wrong with that request. Please try again.