watcher
A simple Node.js watcher.
Install
npm install watcher
Example
var path = ; var Watcher = ; var options = recursive: true exclude: /\./ "node_modules""obj" ; var watcher = path { console; console; //now handle change } options; //to unwatch watcher // or to remove all listeners watcher;
Options
recursive
Enable or disable a recursive watch on a directory. If a file path is passed instead of a dir path then this is ignored. Defaults to true.
exclude
Tells the watcher which files or dir names to ignore. Accepts an array of RegExp
or string
converted to /value/gi
. Defaults to empty array.