Package Exports
- patternplate-transform-less
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (patternplate-transform-less) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.