$ npm install monocle
Have you ever wanted to watch a folder and all of its files/nested folders for changes. well now you can!
npm install monocle
var Monocle = require('monocle')()
Monocle.watchDirectory({
root: <root directory>,
fileFilter: <optional>,
directoryFilter: <optional>,
complete: <fn>, //triggered on file change
callback: fn(filename) //file watching all set up
});
Monocle.watchFiles({
files: [], //path of file(s)
callback: <cb(filename)>, //triggered on file change
complete: <fn> //file watching all set up
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE