MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / watchCallback

Function watchCallback

scripts/run_build.mjs:96–106  ·  view source on GitHub ↗
(eventType, filename)

Source from the content-addressed store, hash-verified

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.

Callers 1

run_build.mjsFile · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected