@webscaffold/task-watcher
v0.1.0-alpha.7
Published
@webscaffold file watcher task
Downloads
18
Readme
@web-scaffold/task-watcher
WEB Scaffold
task for file changes watching.
Install
$ npm install --save-dev @webscaffold/task-watcher
Usage
const watcher = require('@webscaffold/task-watcher');
await watcher(filesGlob, options, taskFn);
This will run Webpack based on the config passed.
API
watcher(filesGlob, options, taskFn)
Returns a Promise with an istance of the watcher class.
filesGlob
Type: Array|string
Glob string or aray of globs of all files to watch.
options
Type: object
Options object that can be passed.
taskName
Type: string
Default: watcher
Task name that will be used by the logger to namespace the logs.
taskColor
Type: string
Default: #88d498
The color used by the logger to log to the console the task output.
label
Type: string
Default: ''
The watcher label namespace used for logging purposes.
taskFn
Type: Function
Default: undefined
Task function to call on changes.
Licensing
MIT © Radu Micu