Package Exports
- gulp-finder
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-finder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-finder
storage plugin for gulp
Features
- Gulp Finder uses fs.extra and recursively searches through the given directory, and creates an objbect 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-finderThen, add it to your gulpfile.js:
// require gulp
var gulp = require('gulp');
// Do this
var finder = require('gulp-finder')(gulp);
// or do this
require('gulp-finder')(gulp);
gulp.task( 'any', function(){
var found = this.finder( './somePath/to/some/where' );
console.log(found)
//=> Object that looks similar to your directory.
});API
finder['someDirectory'].path;
value
- Type: String
- Descr: The path property will be the full path to someDirectoryfinder['someDirectory'].all( );
value
Type: String
Returns: the/full/path/to/the/current/directory + **/*finder['someDirectory'].dirs( String || Array );
arguments
Type: String || Array
Default: '**'
Required: falsefinder['someDirectory'].ext( extension );
extension
Type: String
Default: '*.*'
Required: falsefinder['someDirectory'].any( String );
String
Type: String || Array
Default: '**'
Required: falseTODO
- Add More Methods
- Find a better Library for recursively searching the directory;