Skip to content

Commit f2cba37

Browse files
clydinangular-robot[bot]
authored andcommitted
refactor(@angular-devkit/build-angular): move dev-server builder logic out of index file
The `index.ts` file for the `dev-server` builder was becoming quite large and it was not obvious what was exported for external usage and what was exported to support testing. This change also allows for future extension of the development server without bringing in all of the Webpack-specific functionality.
1 parent 6760d1b commit f2cba37

File tree

3 files changed

+457
-424
lines changed

3 files changed

+457
-424
lines changed

goldens/public-api/angular_devkit/build_angular/index.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,29 @@ export enum CrossOrigin {
105105
UseCredentials = "use-credentials"
106106
}
107107

108-
// @public (undocumented)
109-
export type DevServerBuilderOptions = Schema;
108+
// @public
109+
export interface DevServerBuilderOptions {
110+
allowedHosts?: string[];
111+
browserTarget: string;
112+
disableHostCheck?: boolean;
113+
headers?: {
114+
[key: string]: string;
115+
};
116+
hmr?: boolean;
117+
host?: string;
118+
liveReload?: boolean;
119+
open?: boolean;
120+
poll?: number;
121+
port?: number;
122+
proxyConfig?: string;
123+
publicHost?: string;
124+
servePath?: string;
125+
ssl?: boolean;
126+
sslCert?: string;
127+
sslKey?: string;
128+
verbose?: boolean;
129+
watch?: boolean;
130+
}
110131

111132
// @public
112133
export type DevServerBuilderOutput = DevServerBuildOutput & {
@@ -122,7 +143,7 @@ export function executeBrowserBuilder(options: BrowserBuilderOptions, context: B
122143
}): Observable<BrowserBuilderOutput>;
123144

124145
// @public
125-
export function executeDevServerBuilder(options: DevServerBuilderOptions, context: BuilderContext, transforms?: {
146+
export function executeDevServerBuilder(options: DevServerBuilderOptions_2, context: BuilderContext, transforms?: {
126147
webpackConfiguration?: ExecutionTransformer<webpack.Configuration>;
127148
logging?: WebpackLoggingCallback;
128149
indexHtml?: IndexHtmlTransform;
@@ -154,7 +175,7 @@ export function executeServerBuilder(options: ServerBuilderOptions, context: Bui
154175
export type ExecutionTransformer<T> = (input: T) => T | Promise<T>;
155176

156177
// @public (undocumented)
157-
export type ExtractI18nBuilderOptions = Schema_2;
178+
export type ExtractI18nBuilderOptions = Schema;
158179

159180
// @public (undocumented)
160181
export interface FileReplacement {

0 commit comments

Comments
 (0)