Skip to content

Commit 53c319a

Browse files
committedApr 18, 2024
feat(@angular-devkit/build-angular): add support for the poll option in the library builder
This commit adds support for polling when using the ng-packagr builder Closes #27420
1 parent e3f9f2b commit 53c319a

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed
 

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

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export type KarmaConfigOptions = ConfigOptions & {
303303

304304
// @public
305305
export interface NgPackagrBuilderOptions {
306+
poll?: number;
306307
project: string;
307308
tsConfig?: string;
308309
watch?: boolean;

‎packages/angular/cli/src/commands/build/long-description.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The command can be used to build a project of type "application" or "library".
2-
When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, and `watch` options are applied.
2+
When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, `poll` and `watch` options are applied.
33
All other options apply only to building applications.
44

55
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.

‎packages/angular_devkit/build_angular/src/builders/ng-packagr/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function execute(
4747

4848
const ngPackagrOptions = {
4949
cacheEnabled,
50+
poll: options.poll,
5051
cacheDirectory: join(cacheDirectory, 'ng-packagr'),
5152
};
5253

‎packages/angular_devkit/build_angular/src/builders/ng-packagr/schema.json

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"type": "boolean",
1717
"description": "Run build when files change.",
1818
"default": false
19+
},
20+
"poll": {
21+
"type": "number",
22+
"description": "Enable and define the file watching poll time period in milliseconds."
1923
}
2024
},
2125
"additionalProperties": false,

0 commit comments

Comments
 (0)
Please sign in to comment.