JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q26068F
  • License MIT

A plugin for Gulp

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

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 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 someDirectory

finder['someDirectory'].all( );

value

Type: String
Returns: the/full/path/to/the/current/directory + **/*

finder['someDirectory'].dirs( String || Array );

arguments

Type: String || Array
Default: '**'
Required: false

finder['someDirectory'].ext( extension );

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;

License

MIT License