new Watcher(logger, rawFileDependencies) → {Watcher}
File watcher with dependency handling.
Parameters:
Name | Type | Description |
---|---|---|
logger |
Logger | |
rawFileDependencies |
Object | File depenency tree. |
- Source:
Returns:
- Type
- Watcher
Methods
close()
Unregister all dirs.
- Source:
register(dirs, fn, optsopt)
Register handler for dirs.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dirs |
String | Array.<String> | Dirs to watch. |
||||||||||||||||
fn |
watchCallback | |||||||||||||||||
opts |
Object |
<optional> |
Optional watch parameters. Please notice that if you register a dir twice with different opts, the latter will replace the former. Properties
|
- Source:
unregister(dirs)
Unregister dirs.
Parameters:
Name | Type | Description |
---|---|---|
dirs |
String | Array.<String> | Dirs to stop watching. |
- Source:
updateFileDependencies(rawFileDependencies)
Update file dependencies.
Parameters:
Name | Type | Description |
---|---|---|
rawFileDependencies |
Object | File depenency tree. |
- Source: