https://github.com/aleclarson/wchd
Extensible watcher daemon
https://github.com/aleclarson/wchd
daemon nodejs watcher watchman
Last synced: 4 months ago
JSON representation
Extensible watcher daemon
- Host: GitHub
- URL: https://github.com/aleclarson/wchd
- Owner: aleclarson
- License: mit
- Created: 2018-07-01T20:34:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T06:26:24.000Z (5 months ago)
- Last Synced: 2025-01-09T14:14:51.671Z (4 months ago)
- Topics: daemon, nodejs, watcher, watchman
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wchd v0.10.3
**Extensible watcher daemon** (powered by [fb-watchman][1])
A single, resilient connection shared between all packages via the [wch][2] client.
[1]: https://www.npmjs.com/package/fb-watchman
[2]: https://www.npmjs.com/package/wch```js
const wch = require('wchd');// create a server
const server = wch(opts);// watcher methods
wch.connect();
wch.watch(root, opts);
wch.unwatch(root);
wch.stream(dir, query);
wch.query(dir, query);
wch.list();
```## CLI
- `wch start` start the daemon
- `wch stop` stop the daemon#### Watching
- `wch .` watch current directory
- `wch -u .` unwatch current directory
- `wch ./foo` watch a relative directory
- `wch -u ./foo` unwatch a relative directory
- `wch . -f` watch current directory *temporarily*The foreground (`-f`) watcher is lighter weight, because it only loads plugins that the current directory needs (instead of every plugin that every watched directory needs), and the API server isn't started.