compile-mw-less
v0.1.1
Published
Jade runtime script middleware built on compile-middleware
Downloads
6
Readme
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
Copyright 2013 Shinohane<[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.