MCPcopy
hub / github.com/angular/angular-cli / ng

Function ng

tests/e2e/utils/process.ts:359–372  ·  view source on GitHub ↗
(...args: string[])

Source from the content-addressed store, hash-verified

357}
358
359export function ng(...args: string[]) {
360 const argv = getGlobalVariable('argv');
361 const maybeSilentNg = argv['nosilent'] ? noSilentNg : silentNg;
362 if (['build', 'serve', 'test', 'e2e', 'extract-i18n'].indexOf(args[0]) != -1) {
363 if (args[0] == 'e2e') {
364 // Wait 1 second before running any end-to-end test.
365 return new Promise((resolve) => setTimeout(resolve, 1000)).then(() => maybeSilentNg(...args));
366 }
367
368 return maybeSilentNg(...args);
369 } else {
370 return noSilentNg(...args);
371 }
372}
373
374export function noSilentNg(...args: string[]) {
375 return _exec({}, 'ng', args);

Calls 2

getGlobalVariableFunction · 0.90
noSilentNgFunction · 0.85

Tested by

no test coverage detected