$ gnpm install less-plugin-npm-import
Adds the ability for less to import from npm packages
Install with npm
npm install -g less-plugin-npm-import
In less file:
@import "npm://packagename/path/to/file.less";
css/less extensions not necessary
Options:
prefix - default: npm://
lessc --npm-import file.less file.css
lessc --npm-import="prefix=~" file.less file.css
var NpmImportPlugin = require("less-plugin-npm-import"),
options = { plugins: [new NpmImportPlugin({prefix: '~'})] };
less.render(css, options)
.then(...
Browser usage is not supported.
run the tests by running node test
You require the dev dependencies installed (which includes less)
Copyright 2013 - present © cnpmjs.org | Home |