MCPcopy Index your code
hub / github.com/angular/angular-cli / targetFromTargetString

Function targetFromTargetString

packages/angular_devkit/architect/src/api.ts:336–351  ·  view source on GitHub ↗
(
  specifier: string,
  abbreviatedProjectName?: string,
  abbreviatedTargetName?: string,
)

Source from the content-addressed store, hash-verified

334 * Supports abbreviated target specifiers (examples: `::`, `::development`, or `:build:production`).
335 */
336export function targetFromTargetString(
337 specifier: string,
338 abbreviatedProjectName?: string,
339 abbreviatedTargetName?: string,
340): Target {
341 const tuple = specifier.split(':', 3);
342 if (tuple.length < 2) {
343 throw new Error('Invalid target string: ' + JSON.stringify(specifier));
344 }
345
346 return {
347 project: tuple[0] || abbreviatedProjectName || '',
348 target: tuple[1] || abbreviatedTargetName || '',
349 ...(tuple[2] !== undefined && { configuration: tuple[2] }),
350 };
351}
352
353/**
354 * Schedule a target, and forget about its run. This will return an observable of outputs, that

Callers 9

api_spec.tsFile · 0.90
normalizeOptionsFunction · 0.90
executeFunction · 0.90
_renderUniversalFunction · 0.90
_appShellBuilderFunction · 0.90
_scheduleBuildsFunction · 0.90
executeFunction · 0.90
normalizeOptionsFunction · 0.90
checkForEsbuildFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected