1.0.3 • Published 9 years ago
trucks-transform-less v1.0.3
Less Transform
Compile less sources
Reads <style> and <link> elements with a MIME type of text/less and compiles the source to CSS.
<link rel="stylesheet" type="text/less" href="styles.less">
<style type="text/less"></style>This transform rewrites the contents property of each style node.
Install
npm i trucks-transform-less --save-devFor the command line interface see trucks-cli.
Usage
Use the less key to configure this transform:
const trucks = require('trucks');
trucks(
{
files: ['components.html'],
transforms: ['less'],
conf: {
transforms: {
less: {
paths: [process.cwd()]
}
}
}
}, (err, res) => {
if(err) {
throw err;
}
console.log(res);
}
);The configuration object is passed to less.render(), see the less documentation.
License
MIT
Created by mkdoc on July 18, 2016