gulp-finder
Directory Glob String plugin finder for gulp
Features
- Gulp Finder uses fs.extra and recursively searches through the given directory, and creates an object that mirrors your directory structure.
- Each directory within the Object now has a bunch of methods, which we will discuss down below.
- Each method will either return a string or an array of paths.
- Bind's a finder property to the the gulp instance.
you can call gulp-finder from any gulp task, by calling
this.finder(path)
Usage
First, install gulp-finder
as a development dependency:
npm install --save-dev gulp-finder
Then, add it to your gulpfile.js
:
// require gulpvar gulp = ; // Do thisvar finder = gulp; // or do thisgulp; gulp;
API
finder['someDirectory'].path;
value
- Type: String
- Descr: The path property will be the full path to someDirectory
finder['someDirectory'].all( );
value
Type: String
Returns: the/full/path/to/the/current/directory + **/*
String
|| Array
);
finder['someDirectory'].dirs( arguments
Type: String || Array
Default: '**'
Required: false
extension
);
finder['someDirectory'].ext( extension
Type: String
Default: '*.*'
Required: false
finder['someDirectory'].any( String );
String
Type: String || Array
Default: '**'
Required: false
TODO
- Add More Methods
- Find a better Library for recursively searching the directory;