(paths: string[])
| 65 | } |
| 66 | |
| 67 | function startWatching(paths: string[]): void { |
| 68 | logForDebugging(`FileChanged: watching ${paths.length} paths`) |
| 69 | watcher = chokidar.watch(paths, { |
| 70 | persistent: true, |
| 71 | ignoreInitial: true, |
| 72 | awaitWriteFinish: { stabilityThreshold: 500, pollInterval: 200 }, |
| 73 | ignorePermissionErrors: true, |
| 74 | }) |
| 75 | watcher.on('change', p => handleFileEvent(p, 'change')) |
| 76 | watcher.on('add', p => handleFileEvent(p, 'add')) |
| 77 | watcher.on('unlink', p => handleFileEvent(p, 'unlink')) |
| 78 | } |
| 79 | |
| 80 | function handleFileEvent( |
| 81 | path: string, |
no test coverage detected