https://github.com/bitsofinfo/io-event-reactor-plugin-chokidar
Chokidar filesystem event monitor plugin for: io-event-reactor
https://github.com/bitsofinfo/io-event-reactor-plugin-chokidar
Last synced: 10 months ago
JSON representation
Chokidar filesystem event monitor plugin for: io-event-reactor
- Host: GitHub
- URL: https://github.com/bitsofinfo/io-event-reactor-plugin-chokidar
- Owner: bitsofinfo
- Created: 2016-06-03T16:14:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-27T16:35:41.000Z (almost 9 years ago)
- Last Synced: 2025-03-03T23:53:41.518Z (11 months ago)
- Language: JavaScript
- Homepage: https://github.com/bitsofinfo/io-event-reactor
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# io-event-reactor-plugin-chokidar
[](https://travis-ci.org/bitsofinfo/io-event-reactor-plugin-chokidar)
[Chokidar](https://github.com/paulmillr/chokidar) filesystem event monitor plugin for the [io-event-reactor](https://github.com/bitsofinfo/io-event-reactor) module
[](https://nodei.co/npm/io-event-reactor-plugin-chokidar/)
## Usage
To configure this MonitorPlugin in your application that uses [io-event-reactor](https://github.com/bitsofinfo/io-event-reactor) do the following
```
npm install io-event-reactor-plugin-chokidar
```
Then in your [io-event-reactor](https://github.com/bitsofinfo/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
```