Ogle
Thin wrapper for fs.watch
with glob-pattern matching.
Example
var watcher = 'lib/some-dir/' 'lib/some-dir/*.js'; watcher; watcher; watcher; watcher;
Why?
There are already many wrappers on fs.watch
/fs.watchFile
. Unfortunately, non
of them seemed to be usable without making sacrifices. Ogle chooses the
following advantages:
- glob pattern matching
all/remove/change
events on filesall/add/remove/change
events on directories- Auto-adding of listeners for new files in directories (if we are watching the directory)
- Use of
fs.watch
instead offs.watchFile
. See here for why.
Complete documentation
Coming soon...