Skip to content

Commit 21b437b

Browse files
committed
Updated GCB's ApiExtractorTask to support the new configuration, adding an option "dtsRollupTrimming" for its schema
1 parent 6a3afb2 commit 21b437b

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎core-build/gulp-core-build-typescript/src/ApiExtractorTask.ts‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,18 @@ export interface IApiExtractorTaskConfig {
5656
apiJsonFolder?: string;
5757

5858
/**
59-
* If true, then API Extractor will generate consolidated \*.d.ts outputs for this project.
60-
* The filenames are: "index-internal.d.ts", "index-preview.d.ts", and "index-public.d.ts".
59+
* If true, then API Extractor will generate *.d.ts rollup files for this project.
6160
* @beta
6261
*/
6362
generateDtsRollup?: boolean;
63+
64+
/**
65+
* Only used if generateDtsRollup=true. If dtsRollupTrimming=true, then API Extractor will
66+
* generate separate *.d.ts rollup files for internal, beta, and public release types;
67+
* otherwise a single *.d.ts file will be generated with no trimming.
68+
* @beta
69+
*/
70+
dtsRollupTrimming: boolean;
6471
}
6572

6673
/**
@@ -151,7 +158,8 @@ export class ApiExtractorTask extends GulpTask<IApiExtractorTaskConfig> {
151158

152159
if (this.taskConfig.generateDtsRollup) {
153160
extractorConfig.dtsRollup = {
154-
enabled: true
161+
enabled: true,
162+
trimming: !!this.taskConfig.dtsRollupTrimming
155163
};
156164
}
157165

‎core-build/gulp-core-build-typescript/src/schemas/api-extractor.schema.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
"type": "string"
2929
},
3030
"generateDtsRollup": {
31-
"description": "If true, then API Extractor will generate consolidated *.d.ts outputs for this project. The filenames are: \"index-internal.d.ts\", \"index-preview.d.ts\", and \"index-public.d.ts\".",
31+
"description": "If true, then API Extractor will generate *.d.ts rollup files for this project.",
32+
"type": "boolean"
33+
},
34+
"dtsRollupTrimming": {
35+
"description": "Only used if generateDtsRollup=true. If dtsRollupTrimming=true, then API Extractor will generate separate *.d.ts rollup files for internal, beta, and public release types; otherwise a single *.d.ts file will be generated with no trimming.",
3236
"type": "boolean"
3337
}
3438
},

0 commit comments

Comments
 (0)