Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Latest commit

 

History

History
70 lines (56 loc) · 1.07 KB

README.md

File metadata and controls

70 lines (56 loc) · 1.07 KB

Installation

With jspm:

jspm install less

With native SystemJS:

npm install systemjs-plugin-css systemjs-plugin-less less
SystemJS.config({
  map: {
    css: 'node_modules/systemjs-plugin-css',
    less: 'node_modules/systemjs-plugin-less',
    lesscss: 'node_modules/less'
  },
  packages: {
    lesscss: {
      main: {
        browser: './dist/less.min.js',
        node: '@node/less'
      }
    },
    css: { main: 'css.js' },
    less: { main: 'less.js' }
  }
});

Usage

SystemJS.config({
  meta: {
    '*.less': { loader: 'less' }
  }
});

Or via package configuration:

SystemJS.config({
  packages: {
    'src/': {
      meta: {
        '*.less': { loader: 'less' }
      }
    }
  }
});

In-browser LESS transpilation and builds should then be provided for any LESS files.

Source maps support is included.

This plugin is built on the CSS plugin base and supports the same build options.

License

MIT