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

Function getLegacyOutputPaths

packages/schematics/angular/ssr/index.ts:50–71  ·  view source on GitHub ↗
(
  host: Tree,
  projectName: string,
  target: 'server' | 'build',
)

Source from the content-addressed store, hash-verified

48const DEFAULT_SERVER_DIR = 'server';
49
50async function getLegacyOutputPaths(
51 host: Tree,
52 projectName: string,
53 target: 'server' | 'build',
54): Promise<string> {
55 // Generate new output paths
56 const workspace = await readWorkspace(host);
57 const project = workspace.projects.get(projectName);
58 const architectTarget = project?.targets.get(target);
59 if (!architectTarget?.options) {
60 throw new SchematicsException(`Cannot find 'options' for ${projectName} ${target} target.`);
61 }
62
63 const { outputPath } = architectTarget.options;
64 if (typeof outputPath !== 'string') {
65 throw new SchematicsException(
66 `outputPath for ${projectName} ${target} target is not a string.`,
67 );
68 }
69
70 return outputPath;
71}
72
73async function getApplicationBuilderOutputPaths(
74 host: Tree,

Callers 2

addScriptsRuleFunction · 0.85
addServerFileFunction · 0.85

Calls 2

readWorkspaceFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected