A quick and dirty synchronous file globbing utility based on minimatch.
To be fair, this library isn't terribly efficient. But that's ok, because it's mainly used with relatively small folder structures. Maybe someone will help improve this library (patches welcome!). Or maybe even write a better library, and then I'll use that instead. But for now, this works just fine.
First, install the module with:
npm install glob-whatev
var globsync = ;// Relative patterns are matched against the current working directory.globsync;// Basically, it works like this.globsync// Also, minimatch is exposed in case you just want to match patterns, eg.var isJS = globsync;
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
options.cwdoption to allow searching from a different base directory than
matchBaseminimatch option with simple patterns would fail.
Copyright (c) 2012 "Cowboy" Ben Alman
Licensed under the MIT license.