component-lesser
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -36,3 +36,3 @@ var async = require('async'); | ||
builder.config.styles.forEach(function(file){ | ||
builder.removeFile('styles', file); | ||
isLess(file) && builder.removeFile('styles', file); | ||
}); | ||
@@ -45,3 +45,3 @@ return callback(); | ||
} | ||
builder.removeFile('styles', file); | ||
isLess(file) && builder.removeFile('styles', file); | ||
}); | ||
@@ -48,0 +48,0 @@ var importsLess = ""; |
{ | ||
"name": "component-lesser", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "A plugin to transpile Less files for the compy.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# component-less | ||
A plugin to transpile Less files for the component builder. | ||
A plugin to transpile Less files in single context for compy. Allows to use twitter bootstrap. | ||
## Install | ||
$ npm install component-less | ||
$ npm install component-lesser | ||
## Usage | ||
Add your `.less` files to the `styles` array in your `component.json`: | ||
```javascript | ||
{ | ||
"styles": [ | ||
"base.less", | ||
"button.css" | ||
] | ||
} | ||
``` | ||
Use the plugin during your build process: | ||
```javascript | ||
var Builder = require('component-builder'); | ||
var less = require('component-less'); | ||
var fs = require('fs'); | ||
var builder = new Builder(__dirname); | ||
builder.use(less); | ||
builder.build(function (err, res) { | ||
if (err) { | ||
throw err | ||
} | ||
fs.writeFileSync('build/build.js', res.require + res.js); | ||
if (res.css) { | ||
fs.writeFileSync('build/build.css', res.css); | ||
} | ||
}); | ||
``` | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3531
10