JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q62480F
  • License MIT

Process LESS with patternplate

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 stability

npm version Travis branch Appveyor branch

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


Copyright 2016 by SinnerSchrader Deutschland GmbH and contributors. Released under the MIT license.