Extensible watcher daemon
Extensible watcher daemon (powered by fb-watchman)
A single, resilient connection shared between all packages via the wch client.
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();
wch start
start the daemonwch stop
stop the daemonwch .
watch current directorywch -u .
unwatch current directorywch ./foo
watch a relative directorywch -u ./foo
unwatch a relative directorywch . -f
watch current directory temporarilyThe 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.