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

Function watchRebuild

scripts/run_build.mjs:108–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }
107
108 function watchRebuild() {
109 // Abort any currently running build.
110 abortController.abort();
111 abortController = new AbortController();
112 const {signal} = abortController;
113 const filenames = [...changes];
114 changes.clear();
115
116 buildPromise = buildPromise.then(async () => {
117 try {
118 spinner.start('Rebuilding...');
119 const {time} = await build(target, {signal, filenames});
120 spinner.succeed(`Rebuild successfully (${timeFormatter.format(time)})`);
121 } catch (error) {
122 if (error.name !== 'AbortError') {
123 spinner.fail(error.message);
124 }
125 }
126 });
127 }
128
129 const WATCHLIST = ['front_end', 'test'];
130 for (const dirname of WATCHLIST) {

Callers

nothing calls this directly

Calls 5

buildFunction · 0.90
clearMethod · 0.65
formatMethod · 0.65
abortMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected