node-glob-resolve

0.1.1 • Public • Published

node-glob-resolve

Takes a single glob, or an array of globs and returns the paths to the resolved files relative to a folder. Files are only added once, and they are returned in the order of the globs. Especially useful for using packages that does not support globs with for example gulp.

Example:

  var globResolve = require('node-glob-resolve');
  globResolve([
    '/scripts/main.js',
    '/scripts/second/**/*.js',
    '/scripts/**/*.js'
  ], __dirname);
  // Returns 
  //[
  //    '/scripts/main.js',
  //    '/scripts/second/a.js',
  //    '/scripts/second/b.js',
  //    '/scripts/the_rest_of_the_files.js',
  //]

TODO

  • Document
  • Add support for async

Readme

Keywords

Package Sidebar

Install

npm i node-glob-resolve

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • kennethlynne