@abmaonline/parse-less-import

    0.1.0 • Public • Published

    @abmaonline/parse-less-import

    NPM version node License npm download

    Parse import from less file

    Originally created by LingyuCoder, but no longer available on github and made some changes to make it work with older versions of less.

    Node.js >= 6

    Install

    $ npm install --save @abmaonline/parse-less-import

    Usage

    const parse = require('@abmaonline/parse-less-import');
     
    const content = `
    @import '../a';
    @import './b.less';
    @import (multiple) './c.less';
    @import (multiple, reference) './d.less';
    `;
     
    parse(content);
    /*
    [ { path: '../a', keywords: [] },
      { path: './b.less', keywords: [] },
      { path: './c.less', keywords: [ 'multiple' ] },
      { path: './d.less', keywords: [ 'multiple', 'reference' ] } ]
    */

    Test

    $ npm run test
    $ npm run test-cov

    Install

    npm i @abmaonline/parse-less-import

    DownloadsWeekly Downloads

    27

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    4.25 kB

    Total Files

    5

    Last publish

    Collaborators

    • abmaonline