Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    component-lesspublic

    component-less

    A plugin to transpile Less files for the component builder.

    Install

    $ npm install component-less

    Usage

    Add your .less files to the styles array in your component.json:

    {
        "styles": [
            "base.less",
            "button.css"
        ]
    }

    Use the plugin during your build process:

    var Builder = require('component-builder');
    var less = require('component-less');
    var fs = require('fs');
     
    var builder = new Builder(__dirname);
     
    builder.use(less);
     
    builder.build(function (err, res) {
        if (err) {
            throw err
        }
     
        fs.writeFileSync('build/build.js', res.require + res.js);
     
        if (res.css) {
            fs.writeFileSync('build/build.css', res.css);
        }
    });

    License

    MIT

    install

    npm i component-less

    Downloadslast 7 days

    1

    version

    0.2.3

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar
    • avatar