/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ export declare enum ProjectType { Application = "application", Library = "library" } /** * An enum of the official Angular builders. * Each enum value provides the fully qualified name of the associated builder. * This enum can be used when analyzing the `builder` fields of project configurations from the * `angular.json` workspace file. */ export declare enum Builders { Application = "@angular-devkit/build-angular:application", AppShell = "@angular-devkit/build-angular:app-shell", Server = "@angular-devkit/build-angular:server", Browser = "@angular-devkit/build-angular:browser", SsrDevServer = "@angular-devkit/build-angular:ssr-dev-server", Prerender = "@angular-devkit/build-angular:prerender", BrowserEsbuild = "@angular-devkit/build-angular:browser-esbuild", Karma = "@angular-devkit/build-angular:karma", TsLint = "@angular-devkit/build-angular:tslint", NgPackagr = "@angular-devkit/build-angular:ng-packagr", DevServer = "@angular-devkit/build-angular:dev-server", ExtractI18n = "@angular-devkit/build-angular:extract-i18n", Protractor = "@angular-devkit/build-angular:protractor" } export interface FileReplacements { replace: string; with: string; } export interface BrowserBuilderBaseOptions { main: string; tsConfig: string; fileReplacements?: FileReplacements[]; outputPath?: string; index?: string; polyfills: string; assets?: (object | string)[]; styles?: (object | string)[]; scripts?: (object | string)[]; sourceMap?: boolean; } export type OutputHashing = 'all' | 'media' | 'none' | 'bundles'; export interface BrowserBuilderOptions extends BrowserBuilderBaseOptions { serviceWorker?: boolean; optimization?: boolean; outputHashing?: OutputHashing; resourcesOutputPath?: string; namedChunks?: boolean; aot?: boolean; extractLicenses?: boolean; vendorChunk?: boolean; buildOptimizer?: boolean; ngswConfigPath?: string; budgets?: { type: string; maximumWarning?: string; maximumError?: string; }[]; webWorkerTsConfig?: string; } export interface ServeBuilderOptions { /** * @deprecated not used since version 17.0.0. Use the property "buildTarget" instead. */ browserTarget: string; buildTarget?: string; } export interface LibraryBuilderOptions { tsConfig: string; project: string; } export interface ServerBuilderOptions { outputPath: string; tsConfig: string; main: string; fileReplacements?: FileReplacements[]; optimization?: boolean | { scripts?: boolean; styles?: boolean; }; sourceMap?: boolean | { scripts?: boolean; styles?: boolean; hidden?: boolean; vendor?: boolean; }; } export interface AppShellBuilderOptions { browserTarget: string; serverTarget: string; route: string; } export interface TestBuilderOptions extends Partial { karmaConfig: string; } export interface ExtractI18nOptions { browserTarget: string; } export interface E2EOptions { protractorConfig: string; devServerTarget: string; } export interface BuilderTarget { builder: TBuilder; options: TOptions; configurations?: { production: Partial; [key: string]: Partial; }; } export type LibraryBuilderTarget = BuilderTarget; export type BrowserBuilderTarget = BuilderTarget; export type ServerBuilderTarget = BuilderTarget; export type AppShellBuilderTarget = BuilderTarget; export type TestBuilderTarget = BuilderTarget; export type ServeBuilderTarget = BuilderTarget; export type ExtractI18nBuilderTarget = BuilderTarget; export type E2EBuilderTarget = BuilderTarget; interface WorkspaceCLISchema { warnings?: Record; schematicCollections?: string[]; } export interface WorkspaceSchema { version: 1; cli?: WorkspaceCLISchema; projects: { [key: string]: WorkspaceProject; }; } export interface WorkspaceProject { /** * Project type. */ projectType: ProjectType; root: string; sourceRoot: string; prefix: string; cli?: WorkspaceCLISchema; /** * Tool options. */ architect?: WorkspaceTargets; /** * Tool options. */ targets?: WorkspaceTargets; } export interface WorkspaceTargets { build?: TProjectType extends ProjectType.Library ? LibraryBuilderTarget : BrowserBuilderTarget; server?: ServerBuilderTarget; test?: TestBuilderTarget; serve?: ServeBuilderTarget; e2e?: E2EBuilderTarget; 'app-shell'?: AppShellBuilderTarget; 'extract-i18n'?: ExtractI18nBuilderTarget; [key: string]: any; } export {};