lessbuildify
v0.1.2
Published
Browserify plugin for compiling Less to the external file
Downloads
4
Maintainers
Readme
lessbuildify
Browserify plugin for compiling Less to the external file. Also applies autoprefixer and clean-css.
cli
subarg syntax:
$ browserify -p [ lessbuildify --dest out.css ] in.js -o out.js
module
var fs = require('fs'),
browserify = require('browserify'),
lessbuildify = require('lessbuildify');
var b = browserify('in.js');
b.plugin(lessbuildify, { dest: 'out.css' });
b.bundle().pipe(fs.createWriteStream('out.js'))
grunt
browserify: {
files: { 'out.js': 'in.js' },
options: {
plugin: [
[ 'lessbuildify', {
dest: 'out.css',
less: { sourceMap: true },
autoprefixer: { map: 'inline' },
cleancss: false
} ]
]
}
}
options
options.dest
Destination .css
-file to write out compiled and processed .less
-files. No default value.
options.less
Defaults:
less: {
compress: false,
cleancss: false,
ieCompat: false,
syncImport: true,
sourceMap: false
}
Less parser's and compiler's options are combined into one hash.
options.autoprefixer
Defaults:
autoprefixer: {
cascade: true,
map: false
}
options.cleancss
Defaults:
cleancss: {
processImport: false,
noRebase: true,
keepSpecialComments: 0
}