@plurid/pipes.finder
v0.0.0-3
Published
Files Finder Pipe
Downloads
4
Readme
Contents
Install
It is preferred to install the pipe
globally
npm install -g @plurid/pipes.finder
and run the script with the global NODE_PATH
export NODE_PATH=$(npm root --quiet -g) && node path/to/script.js
Usage
// finder-script.js
const finder = require('@plurid/pipes.finder').default;
// all the files in the `process.cwd()` directory
const allFiles = finder();
// all the files except those containing `'node_modules'` in name
const filesExclude = finder({
exclude: [
'node_modules',
],
});
// all the files with the extension `'.ts'`, except those in `'node_modules'`
const tsFiles = finder({
extension: '.ts', // accepts RegExp
exclude: [
'node_modules',
],
});
// all the files from the `'path/to/root'` directory
const rootedFiles = finder({
root: 'path/to/root',
});
Packages
@plurid/pipes.finder • files finder pipe
@plurid/pipes.replacer • content replacer pipe