Skip to content

Commit c6a92a6

Browse files
alan-agius4hansl
authored andcommitted
refactor: change code to work with TypeScript 3 and add missing models
1 parent d5d9790 commit c6a92a6

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/schematics/angular/e2e/index.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,9 @@ export default function (options: E2eOptions): Rule {
119119
validateProjectName(options.name);
120120

121121
const workspace = getWorkspace(host);
122-
let newProjectRoot = workspace.newProjectRoot;
123-
let appDir = `${newProjectRoot}/${options.name}`;
124-
125-
126-
if (options.projectRoot !== undefined) {
127-
newProjectRoot = options.projectRoot;
128-
appDir = newProjectRoot;
129-
}
122+
const appDir = options.projectRoot !== undefined
123+
? options.projectRoot
124+
: `${workspace.newProjectRoot}/${options.name}`;
130125

131126
return chain([
132127
addAppToWorkspaceFile(options, workspace),

packages/schematics/angular/utility/workspace-models.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export interface BrowserBuilderOptions extends BrowserBuilderBaseOptions {
5353
extractLicenses?: boolean;
5454
vendorChunk?: boolean;
5555
buildOptimizer?: boolean;
56+
budgets?: {
57+
type: string;
58+
maximumWarning?: string;
59+
maximumError?: string;
60+
}[];
5661
}
5762

5863
export interface ServeBuilderOptions {
@@ -119,7 +124,6 @@ export interface WorkspaceSchema extends experimental.workspace.WorkspaceSchema
119124
};
120125
}
121126

122-
// tslint:disable-next-line:no-any
123127
export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType.Application>
124128
extends experimental.workspace.WorkspaceProject {
125129
/**

0 commit comments

Comments
 (0)