io-event-reactor-plugin-chokidar
v1.0.0-beta.2
Published
Chokidar filesystem event monitor plugin for the io-event-reactor module
Downloads
3
Maintainers
Readme
io-event-reactor-plugin-chokidar
Chokidar filesystem event monitor plugin for the io-event-reactor module
Usage
To configure this MonitorPlugin in your application that uses io-event-reactor do the following
npm install io-event-reactor-plugin-chokidar
Then in your io-event-reactor configuration object that you pass to the IoReactorService
constructor, you will specify this plugin in the monitor
block as so:
var ioReactorServiceConf = {
...
ioReactors: [
{
id: "reactor1",
monitor: {
plugin: "io-event-reactor-plugin-chokidar",
config: {
// the paths to have chokidar monitor
paths: ['path1/','/path2/x', ....],
// the options below are standard Chokidar options
// see: https://github.com/paulmillr/chokidar
options: {
alwaysStat: false,
awaitWriteFinish: {
stabilityThreshold: 200,
pollInterval: 100
},
ignoreInitial:true
}
}
},
evaluators: [...],
reactors:[...]
},
....
]
...
};
Unit tests
To run the unit tests go to the root of the project and run the following.
mocha test/all.js