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

Function writeWorkspace

packages/angular_devkit/core/src/workspace/core.ts:132–151  ·  view source on GitHub ↗
(
  workspace: WorkspaceDefinition,
  host: WorkspaceHost,
  path?: string,
  format?: WorkspaceFormat,
)

Source from the content-addressed store, hash-verified

130 * @return An `Promise` of type `void`.
131 */
132export async function writeWorkspace(
133 workspace: WorkspaceDefinition,
134 host: WorkspaceHost,
135 path?: string,
136 format?: WorkspaceFormat,
137): Promise<void> {
138 if (format === undefined) {
139 format = formatLookup.get(workspace);
140 if (format === undefined) {
141 throw new Error('A format is required for custom workspace objects.');
142 }
143 }
144
145 switch (format) {
146 case WorkspaceFormat.JSON:
147 return writeJsonWorkspace(workspace, host, path);
148 default:
149 throw new Error('Unsupported workspace format.');
150 }
151}

Callers 1

core_spec.tsFile · 0.90

Calls 2

writeJsonWorkspaceFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected