1 | import { experimental } from '@angular-devkit/core';
|
2 | export declare enum ProjectType {
|
3 | Application = "application",
|
4 | Library = "library"
|
5 | }
|
6 | export declare enum Builders {
|
7 | AppShell = "@angular-devkit/build-angular:app-shell",
|
8 | Server = "@angular-devkit/build-angular:server",
|
9 | Browser = "@angular-devkit/build-angular:browser",
|
10 | Karma = "@angular-devkit/build-angular:karma",
|
11 | TsLint = "@angular-devkit/build-angular:tslint",
|
12 | NgPackagr = "@angular-devkit/build-ng-packagr:build",
|
13 | DevServer = "@angular-devkit/build-angular:dev-server",
|
14 | ExtractI18n = "@angular-devkit/build-angular:extract-i18n",
|
15 | Protractor = "@angular-devkit/build-angular:protractor"
|
16 | }
|
17 | export interface FileReplacements {
|
18 | replace: string;
|
19 | with: string;
|
20 | }
|
21 | export interface BrowserBuilderBaseOptions {
|
22 | main: string;
|
23 | tsConfig: string;
|
24 | fileReplacements?: FileReplacements[];
|
25 | outputPath?: string;
|
26 | index?: string;
|
27 | polyfills: string;
|
28 | assets?: (object | string)[];
|
29 | styles?: (object | string)[];
|
30 | scripts?: (object | string)[];
|
31 | sourceMap?: boolean;
|
32 | }
|
33 | export interface BrowserBuilderOptions extends BrowserBuilderBaseOptions {
|
34 | serviceWorker?: boolean;
|
35 | optimization?: boolean;
|
36 | outputHashing?: 'all';
|
37 | resourcesOutputPath?: string;
|
38 | extractCss?: boolean;
|
39 | namedChunks?: boolean;
|
40 | aot?: boolean;
|
41 | extractLicenses?: boolean;
|
42 | vendorChunk?: boolean;
|
43 | buildOptimizer?: boolean;
|
44 | ngswConfigPath?: string;
|
45 | budgets?: {
|
46 | type: string;
|
47 | maximumWarning?: string;
|
48 | maximumError?: string;
|
49 | }[];
|
50 | es5BrowserSupport?: boolean;
|
51 | webWorkerTsConfig?: string;
|
52 | }
|
53 | export interface ServeBuilderOptions {
|
54 | browserTarget: string;
|
55 | }
|
56 | export interface LibraryBuilderOptions {
|
57 | tsConfig: string;
|
58 | project: string;
|
59 | }
|
60 | export interface ServerBuilderOptions {
|
61 | outputPath: string;
|
62 | tsConfig: string;
|
63 | main: string;
|
64 | fileReplacements?: FileReplacements[];
|
65 | optimization?: {
|
66 | scripts?: boolean;
|
67 | styles?: boolean;
|
68 | };
|
69 | sourceMap?: boolean;
|
70 | }
|
71 | export interface AppShellBuilderOptions {
|
72 | browserTarget: string;
|
73 | serverTarget: string;
|
74 | route: string;
|
75 | }
|
76 | export interface TestBuilderOptions extends Partial<BrowserBuilderBaseOptions> {
|
77 | karmaConfig: string;
|
78 | }
|
79 | export interface LintBuilderOptions {
|
80 | tsConfig: string[] | string;
|
81 | exclude?: string[];
|
82 | }
|
83 | export interface ExtractI18nOptions {
|
84 | browserTarget: string;
|
85 | }
|
86 | export interface E2EOptions {
|
87 | protractorConfig: string;
|
88 | devServerTarget: string;
|
89 | }
|
90 | export interface BuilderTarget<TBuilder extends Builders, TOptions> {
|
91 | builder: TBuilder;
|
92 | options: TOptions;
|
93 | configurations?: {
|
94 | production: Partial<TOptions>;
|
95 | [key: string]: Partial<TOptions>;
|
96 | };
|
97 | }
|
98 | export declare type LibraryBuilderTarget = BuilderTarget<Builders.NgPackagr, LibraryBuilderOptions>;
|
99 | export declare type BrowserBuilderTarget = BuilderTarget<Builders.Browser, BrowserBuilderOptions>;
|
100 | export declare type ServerBuilderTarget = BuilderTarget<Builders.Server, ServerBuilderOptions>;
|
101 | export declare type AppShellBuilderTarget = BuilderTarget<Builders.AppShell, AppShellBuilderOptions>;
|
102 | export declare type LintBuilderTarget = BuilderTarget<Builders.TsLint, LintBuilderOptions>;
|
103 | export declare type TestBuilderTarget = BuilderTarget<Builders.Karma, TestBuilderOptions>;
|
104 | export declare type ServeBuilderTarget = BuilderTarget<Builders.DevServer, ServeBuilderOptions>;
|
105 | export declare type ExtractI18nBuilderTarget = BuilderTarget<Builders.ExtractI18n, ExtractI18nOptions>;
|
106 | export declare type E2EBuilderTarget = BuilderTarget<Builders.Protractor, E2EOptions>;
|
107 | export interface WorkspaceSchema extends experimental.workspace.WorkspaceSchema {
|
108 | projects: {
|
109 | [key: string]: WorkspaceProject<ProjectType.Application | ProjectType.Library>;
|
110 | };
|
111 | }
|
112 | export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType.Application> extends experimental.workspace.WorkspaceProject {
|
113 | |
114 |
|
115 |
|
116 | projectType: ProjectType;
|
117 | |
118 |
|
119 |
|
120 | architect?: WorkspaceTargets<TProjectType>;
|
121 | |
122 |
|
123 |
|
124 | targets?: WorkspaceTargets<TProjectType>;
|
125 | }
|
126 | export interface WorkspaceTargets<TProjectType extends ProjectType = ProjectType.Application> {
|
127 | build?: TProjectType extends ProjectType.Library ? LibraryBuilderTarget : BrowserBuilderTarget;
|
128 | server?: ServerBuilderTarget;
|
129 | lint?: LintBuilderTarget;
|
130 | test?: TestBuilderTarget;
|
131 | serve?: ServeBuilderTarget;
|
132 | e2e?: E2EBuilderTarget;
|
133 | 'app-shell'?: AppShellBuilderTarget;
|
134 | 'extract-i18n'?: ExtractI18nBuilderTarget;
|
135 | [key: string]: any;
|
136 | }
|