customize-engine-less
A less-engine for customize
Installation
npm install customize-engine-less
Usage
The following example demonstrates how to use this module:
var customize = require('customize')
customize()
.registerEngine('less', require('customize-engine-less'))
.merge({
less: {
main: require.resolve('./main.less')
}
})
.merge({
less: {
main: require.resolve('./override.less')
}
})
.run()
.done(console.log)
This will generate the following output
{ less:
{ 'main.css': 'div{color:red;background-color:green}',
'main.css.map': '{"version":3,"sources":["/home/nknappmeier/privat/bootprint/customize-engine-less/examples/main.less"],"names":[],"mappings":"AAGA,IACE,SAAA,CACA"}' } }
API-reference
Functions
- coerceToArray(objOrArray) ⇒
If objOrArray
exists and is a non-array, it is replaced by
an array with the property as single object.
### Typedefs
- CustomizeLessConfig :
object
Configuration for the customize less-engine
### coerceToArray(objOrArray) ⇒
If `objOrArray` exists and is a non-array, it is replaced by
an array with the property as single object.
Kind: global function
Returns: objOrArray, if it is an array or an array containing objOrArray
(if it is no array)
Param | Type | Description |
---|
objOrArray | object | the object or an array |
CustomizeLessConfig : object
Configuration for the customize less-engine
Kind: global typedef
Api: public
Properties
Name | Type | Description |
---|
main | string | Array.<string> | absolute path to a lesscss-file or a list of absolute paths to less files |
path | string | Array.<string> | absolute path (or a list of those) to paths to use as import path |
License
customize-engine-less
is published under the MIT-license.
See LICENSE.md for details.
Release-Notes
For release notes, see CHANGELOG.md
Contributing guidelines
See CONTRIBUTING.md.