Skip to content

Commit

Permalink
feat(@angular-devkit/build-angular): add support for the poll optio…
Browse files Browse the repository at this point in the history
…n in the library builder

This commit adds support for polling when using the ng-packagr builder

Closes #27420
  • Loading branch information
alan-agius4 committed Apr 18, 2024
1 parent e3f9f2b commit 53c319a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions goldens/public-api/angular_devkit/build_angular/index.md
Expand Up @@ -303,6 +303,7 @@ export type KarmaConfigOptions = ConfigOptions & {

// @public
export interface NgPackagrBuilderOptions {
poll?: number;
project: string;
tsConfig?: string;
watch?: boolean;
Expand Down
@@ -1,5 +1,5 @@
The command can be used to build a project of type "application" or "library".
When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, and `watch` options are applied.
When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, `poll` and `watch` options are applied.
All other options apply only to building applications.

The application builder uses the [esbuild](https://esbuild.github.io/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
Expand Down
Expand Up @@ -47,6 +47,7 @@ export function execute(

const ngPackagrOptions = {
cacheEnabled,
poll: options.poll,
cacheDirectory: join(cacheDirectory, 'ng-packagr'),
};

Expand Down
Expand Up @@ -16,6 +16,10 @@
"type": "boolean",
"description": "Run build when files change.",
"default": false
},
"poll": {
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds."
}
},
"additionalProperties": false,
Expand Down

0 comments on commit 53c319a

Please sign in to comment.