require-path
Recursively require(...)
files from a directory tree in Node.js
Works with Node.js v4.0.0
and above.
Branch | Status |
---|---|
Master | |
All |
Usage
var path = ; // returns a standard promise // don't forget to handle errors! ;
Options
Property | Description |
---|---|
path | string or array of absolute paths to search for files. Default: . . |
include | string or array of minimatch patterns. A file in the path(s) that match at least one pattern will be require(...) 'd unless the file also matches an exclusion pattern. Default: ['**/*.js', '**/*.json'] . |
exclude | string or array of minimatch patterns. Files in the path(s) that match at least one pattern will be excluded. Default: ['**/*Spec.js'] . |