bauer-plugin-watch
v0.2.1
Published
Plugin for bauer to watch for file changes.
Downloads
2
Maintainers
Readme
node-bauer-plugin-watch
Plugin for bauer
to watch for file changes
Installation
npm install bauer-plugin-watch
Usage
The awesome chokidar
module is used internally to watch files. Note that after the given files change, promise is resolved and files are no longer watched. This is a one-time thing.
module.exports = function(promise) {
return promise.watch(__dirname + "/sample.txt")
.then(function(details) {
console.log(details.event, details.path);
});
};
module.exports = function(promise) {
return promise.return(__dirname + "/sample.txt")
.watch()
.then(function(details) {
console.log(details.event, details.path);
});
};
Configuration
{
workers: 1,
slots: 1,
delay: 0,
options: { // default options for chokidar
persistent: true,
ignored: '*.txt',
ignoreInitial: false,
followSymlinks: true,
cwd: '.',
usePolling: true,
alwaysStat: false,
depth: undefined,
interval: 100,
ignorePermissionErrors: false,
atomic: true
}
}
API Summary
Promise
.watch() :Promise
.watch(files Array) :Promise
.watch(file String) :Promise
.watch(files Array, options Object) :Promise
.watch(file String, options Object) :Promise
.watch(options Object) :Promise