JSPM

less-plugin-npm-import

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 71684
  • Score
    100M100P100Q151327F

npm import plugin for less.js

Package Exports

  • less-plugin-npm-import

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 (less-plugin-npm-import) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

less-plugin-npm-import

Adds the ability for less to import from npm packages

  1. Install with npm
  2. specify plugin in lessc with --npm-import No options. import with npm://packagename/path.. css/less extensions not necessary

To use programatically, use something like this

var npm-import-plugin = require("less-plugin-npm-import"),
    options = { plugins: [npm-import-plugin] };
less.render(css, options)
    .then(...

Testing

run the tests by running node test/index.js You require the dev dependencies and less v2 in your node_modules (it will be added as a dev dependency once less v2 is released)