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