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

Function getWorkspace

packages/schematics/angular/utility/workspace.ts:82–91  ·  view source on GitHub ↗
(
  tree: Tree,
  path: string = DEFAULT_WORKSPACE_PATH,
)

Source from the content-addressed store, hash-verified

80 * @returns A {@link WorkspaceDefinition} representing the workspace found at the specified path.
81 */
82export async function getWorkspace(
83 tree: Tree,
84 path: string = DEFAULT_WORKSPACE_PATH,
85): Promise<WorkspaceDefinition> {
86 const host = new TreeWorkspaceHost(tree);
87
88 const { workspace } = await workspaces.readWorkspace(path, host);
89
90 return workspace;
91}
92
93/**
94 * Writes a workspace file (`angular.json`) to the provided {@link Tree} instance.

Callers 11

index.tsFile · 0.90
index.tsFile · 0.90
createProjectSchematicFunction · 0.90
getMainFilePathFunction · 0.90
getProjectFunction · 0.90
getAppOptionsFunction · 0.90
addServerRoutingConfigFunction · 0.90
migration.tsFile · 0.90
migration.tsFile · 0.90
updateWorkspaceFunction · 0.70
createDefaultPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected