A less-engine for customize
npm install customize-engine-less
The following example demonstrates how to use this module:
varcustomize=require('customize')// Load files from one directory and merge with secondcustomize().registerEngine('less',require('customize-engine-less'))// Add one less file.merge({less: {main: require.resolve('./main.less')}})// Add another less file overriding some variables.merge({less: {main: require.resolve('./override.less')}}).run().then(console.log)This will generate the following output
{ less:
{ 'main.css':
'div{color:red;background-color:green}/*# sourceMappingURL=main.css.map */',
'main.css.map':
'{"version":3,"sources":["/home/nknappmeier/projects/bootprint/customize-engine-less/examples/main.less"],"names":[],"mappings":"AAGA,IACE,SAAA,CACA","sourcesContent":["@textcolor: blue;\\n@bgcolor: green;\\n\\ndiv {\\n color: @textcolor;\\n background-color: @bgcolor; \\n}\\n\\n\\n\\n"]}' } }
This package will always support the latest version of NodeJS and as well as the current LTS version. In the future, it will not be considered a breaking change to drop support of a pre-LTS version of NodeJS.
customize-engine-less is published under the MIT-license.
See LICENSE.md for details.
For release notes, see CHANGELOG.md
See CONTRIBUTING.md.