node-glob-resolve
v0.1.1
Published
Takes a single glob, or an array of globs and returns the paths to the resolved files relative to a folder.
Downloads
3
Readme
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