MCPcopy Create free account
hub / github.com/nodejs/node / startWatching

Function startWatching

test/fixtures/snapshot/typescript.js:125408–125428  ·  view source on GitHub ↗
(state, buildOrder)

Source from the content-addressed store, hash-verified

125406 });
125407 }
125408 function startWatching(state, buildOrder) {
125409 if (!state.watchAllProjectsPending)
125410 return;
125411 state.watchAllProjectsPending = false;
125412 for (var _i = 0, _a = getBuildOrderFromAnyBuildOrder(buildOrder); _i < _a.length; _i++) {
125413 var resolved = _a[_i];
125414 var resolvedPath = toResolvedConfigFilePath(state, resolved);
125415 var cfg = parseConfigFile(state, resolved, resolvedPath);
125416 // Watch this file
125417 watchConfigFile(state, resolved, resolvedPath, cfg);
125418 watchExtendedConfigFiles(state, resolvedPath, cfg);
125419 if (cfg) {
125420 // Update watchers for wildcard directories
125421 watchWildCardDirectories(state, resolved, resolvedPath, cfg);
125422 // Watch input files
125423 watchInputFiles(state, resolved, resolvedPath, cfg);
125424 // Watch package json files
125425 watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
125426 }
125427 }
125428 }
125429 function stopWatching(state) {
125430 ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
125431 ts.clearMap(state.allWatchedExtendedConfigFiles, ts.closeFileWatcherOf);

Callers 1

buildFunction · 0.85

Calls 8

toResolvedConfigFilePathFunction · 0.85
parseConfigFileFunction · 0.85
watchConfigFileFunction · 0.85
watchExtendedConfigFilesFunction · 0.85
watchWildCardDirectoriesFunction · 0.85
watchInputFilesFunction · 0.85
watchPackageJsonFilesFunction · 0.85

Tested by

no test coverage detected