watch-filter

1.0.2 • Public • Published

watch-filter

Summary

Watch filter for excluding files and folders by regular expressions.

Install

npm install --save-dev watch watch-filter

Usage

package.json::

{
  "scripts": {
    "test": "...",
    "watchTest": "node_modules/.bin/watch 'npm test' --filter=config/watch-filter.js"
  }
}

config/watch-filter.js:

var path = require('path');
var WatchFilter = require('watch-filter').default;
const watchFilter = new WatchFilter({
 
  projectDirectory: path.join(__dirname, '..'),
 
  folderExcludes: [
    '^node_modules',
    '^.git',
    '^coverage'
  ],
 
  fileExcludes: [
    '^config/watch-filter.json$',
    '^package.json$'
  ]
 
});
module.exports = watchFilter.filter;

Contribution

Contribution documentation can be found here.

Readme

Keywords

Package Sidebar

Install

npm i watch-filter

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • coreyferguson