Neil Patrick's Mansion

    get-less-imports

    0.0.3 • Public • Published

    Intro

    Get .less files' @imports recursively, fast than less.parse

    Install

    $ npm i -S get-less-imports

    Usage

    var findImports = require('../index');
    var paths = findImports(__dirname + '/fixtures/less1.less');
    console.log(paths)
    /*
    { simple:
       [ '/Users/.../test/fixtures/less02.less',
         '/Users/.../test/fixtures/less003.less',
         '/Users/.../test/fixtures/less0004.less',
         '/Users/.../test/fixtures/less0002.less' ],
      full:
       { '/Users/.../test/fixtures/less1.less': [ '/Users/.../test/fixtures/less02.less' ],
         '/Users/.../test/fixtures/less02.less': [ '/Users/.../test/fixtures/less003.less' ],
         '/Users/.../test/fixtures/less003.less':
          [ '/Users/.../test/fixtures/less0004.less',
            '/Users/.../test/fixtures/less0002.less' ] 
        } 
    }
    */

    See gulp-watch-less2 for real world usage.

    License

    MIT © John Xiao

    Install

    npm i get-less-imports

    DownloadsWeekly Downloads

    9

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • bammoo