less-plugin-npm-import
npm import plugin for less.js
Last updated 5 years ago by agatronic .
Apache v2 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install less-plugin-npm-import 
SYNC missed versions from official npm registry.

NPM version Dependencies devDependency Status optionalDependency Status

less-plugin-npm-import

Adds the ability for less to import from npm packages

lessc usage

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://

Command line usage

lessc --npm-import file.less file.css
lessc --npm-import="prefix=~" file.less file.css

Programmatic usage

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

Browser usage

Browser usage is not supported.

Testing

run the tests by running node test You require the dev dependencies installed (which includes less)

Current Tags

  • 2.1.0                                ...           latest (5 years ago)

6 Versions

  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Downloads
Today 41
This Week 4,605
This Month 17,512
Last Day 346
Last Week 4,507
Last Month 12,038
Dependencies (2)
Dev Dependencies (2)
Dependents (144)

Copyright 2014 - 2017 © taobao.org |