MCPcopy Index your code
hub / github.com/SoCreate/angular-playground / startWatch

Function startWatch

projects/cli/src/start-watch.ts:4–15  ·  view source on GitHub ↗
(sourceRoots: string[], cb: Function)

Source from the content-addressed store, hash-verified

2import watch from 'node-watch';
3
4export function startWatch(sourceRoots: string[], cb: Function) {
5 const filter = (fn: Function) => {
6 return (evt: string, filename: string) => {
7 if (!/node_modules/.test(filename) && /\.sandbox.ts$/.test(filename)) {
8 fn(filename);
9 }
10 };
11 };
12
13 sourceRoots.forEach(sourceRoot =>
14 watch(resolvePath(sourceRoot), { recursive: true }, filter(cb)));
15}

Callers 1

runFunction · 0.90

Calls 1

filterFunction · 0.85

Tested by

no test coverage detected