(eventType, filename)
| 94 | const changes = new Set(); |
| 95 | |
| 96 | function watchCallback(eventType, filename) { |
| 97 | if (eventType !== 'change' && eventType !== 'rename') { |
| 98 | return; |
| 99 | } |
| 100 | if (!/^(BUILD\.gn)|(.*\.(css|js|ts))$/.test(filename)) { |
| 101 | return; |
| 102 | } |
| 103 | changes.add(filename); |
| 104 | clearTimeout(timeoutId); |
| 105 | timeoutId = setTimeout(watchRebuild, 250); |
| 106 | } |
| 107 | |
| 108 | function watchRebuild() { |
| 109 | // Abort any currently running build. |