patternplate-transform-less
v0.2.5
Published
patternplate transform creating css from less sources
Downloads
84
Readme
patternplate-transform-less
Process LESS with patternplate.
Installation
npm install --save patternplate-transform-less
Configuration
Tell patternplate to load the less
transform
// configuration/patternplate-server/transforms.js
module.exports = {
less: {
inFormat: 'less',
outFormat: 'css',
opts: {
// pass less options here.
}
}
};
Use the configured transform for pattern format transformation
// configuration/patternplate-server/patterns.js
module.exports = {
formats: {
less: {
transforms: ['less']
}
}
};
Less plugins
Install less plugins separately and configure them in the less transform options under the plugins key:
npm install --save less-plugin-autoprefix
// configuration/patternplate-server/transforms.js
module.exports = {
less: {
inFormat: 'less',
outFormat: 'css',
plugins: {
autoprefix: {
enabled: true // load less-plugin-autoprefix,
opts: { // pass .opts as options into the plugin constructor
browsers: ['last 2 version']
}
}
}
}
};
See also
- patternplate - Create, show and deliver component libraries
- transform-sass - Process SASS to CSS
- transform-postcss - Process CSS via PostCSS
Copyright 2016 by SinnerSchrader Deutschland GmbH and contributors. Released under the MIT license.