|
|
|
@ -1,8 +1,8 @@ |
|
|
|
import { experimental, strings, workspaces } from '@angular-devkit/core'; |
|
|
|
import { strings, workspaces } from '@angular-devkit/core'; |
|
|
|
import { SchematicsException, Tree } from '@angular-devkit/schematics'; |
|
|
|
import { Exception } from '../enums'; |
|
|
|
import { Project } from '../models'; |
|
|
|
import { getWorkspace, ProjectType } from './angular'; |
|
|
|
import { getWorkspace, ProjectType, WorkspaceSchema } from './angular'; |
|
|
|
import { findEnvironmentExpression } from './ast'; |
|
|
|
import { readFileInTree } from './common'; |
|
|
|
|
|
|
|
@ -23,7 +23,7 @@ export function readWorkspaceSchema(tree: Tree) { |
|
|
|
const workspaceBuffer = tree.read('/angular.json') || tree.read('/workspace.json'); |
|
|
|
if (!workspaceBuffer) throw new SchematicsException(Exception.NoWorkspace); |
|
|
|
|
|
|
|
let workspaceSchema: experimental.workspace.WorkspaceSchema; |
|
|
|
let workspaceSchema: WorkspaceSchema; |
|
|
|
|
|
|
|
try { |
|
|
|
workspaceSchema = JSON.parse(workspaceBuffer.toString()); |
|
|
|
|