Skip to content

Commit 6bb114a

Browse files
authored
Merge pull request microsoft#612 from Microsoft/qz2017/more_params
[gulp-core-build-typescript] Expose more API-Extractor config options
2 parents 77793c7 + e383e39 commit 6bb114a

5 files changed

Lines changed: 73 additions & 4 deletions

File tree

apps/api-extractor/src/extractor/api-extractor.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@
145145
"type": "string"
146146
},
147147
"publishFolderForInternal": {
148-
"description": "This setting is only used if \"trimming\" is false. It indicates the folder where \"npm publish\" will be run for an internal release. The default value is \"./dist/internal\". An internal release will contain all definitions that are reachable from the entry point.",
148+
"description": "This setting is only used if \"trimming\" is true. It indicates the folder where \"npm publish\" will be run for an internal release. The default value is \"./dist/internal\". An internal release will contain all definitions that are reachable from the entry point.",
149149
"type": "string"
150150
},
151151
"publishFolderForBeta": {
152-
"description": "This setting is only used if \"trimming\" is false. It indicates the folder where \"npm publish\" will be run for a beta release. The default value is \"./dist/beta\". A beta release will contain all definitions that are reachable from the entry point, except definitions marked as @alpha or @internal.",
152+
"description": "This setting is only used if \"trimming\" is true. It indicates the folder where \"npm publish\" will be run for a beta release. The default value is \"./dist/beta\". A beta release will contain all definitions that are reachable from the entry point, except definitions marked as @alpha or @internal.",
153153
"type": "string"
154154
},
155155
"publishFolderForPublic": {
156-
"description": "This setting is only used if \"trimming\" is false. It indicates the folder where \"npm publish\" will be run for a public release. The default value is \"./dist/public\". A public release will contain all definitions that are reachable from the entry point, except definitions marked as @beta, @alpha, or @internal.",
156+
"description": "This setting is only used if \"trimming\" is true. It indicates the folder where \"npm publish\" will be run for a public release. The default value is \"./dist/public\". A public release will contain all definitions that are reachable from the entry point, except definitions marked as @beta, @alpha, or @internal.",
157157
"type": "string"
158158
},
159159
"mainDtsRollupPath": {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-extractor",
5+
"comment": "Fix errors in schema documentation",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/api-extractor",
10+
"email": "qz2017@users.noreply.github.com"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/gulp-core-build-typescript",
5+
"comment": "Expose three more api-extractor config parameters in gulp-core-build-typescript",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/gulp-core-build-typescript",
10+
"email": "qz2017@users.noreply.github.com"
11+
}

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

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,38 @@ export interface IApiExtractorTaskConfig {
6868
* @beta
6969
*/
7070
dtsRollupTrimming: boolean;
71+
72+
/**
73+
* This setting is only used if dtsRollupTrimming is true.
74+
* It indicates the folder where "npm publish" will be run for an internal release.
75+
* The default value is "./dist/internal".
76+
*
77+
* @beta
78+
* An internal release will contain all definitions that are reachable from the entry point.
79+
*/
80+
publishFolderForInternal?: string;
81+
82+
/**
83+
* This setting is only used if dtsRollupTrimming is true.
84+
* It indicates the folder where "npm publish" will be run for a beta release.
85+
* The default value is "./dist/beta".
86+
*
87+
* @beta
88+
* A beta release will contain all definitions that are reachable from the entry point,
89+
* except definitions marked as \@alpha or \@internal.
90+
*/
91+
publishFolderForBeta?: string;
92+
93+
/**
94+
* This setting is only used if dtsRollupTrimming is true.
95+
* It indicates the folder where "npm publish" will be run for a public release.
96+
* The default value is "./dist/public".
97+
*
98+
* @beta
99+
* A public release will contain all definitions that are reachable from the entry point,
100+
* except definitions marked as \@beta, \@alpha, or \@internal.
101+
*/
102+
publishFolderForPublic?: string;
71103
}
72104

73105
/**
@@ -159,7 +191,10 @@ export class ApiExtractorTask extends GulpTask<IApiExtractorTaskConfig> {
159191
if (this.taskConfig.generateDtsRollup) {
160192
extractorConfig.dtsRollup = {
161193
enabled: true,
162-
trimming: !!this.taskConfig.dtsRollupTrimming
194+
trimming: !!this.taskConfig.dtsRollupTrimming,
195+
publishFolderForInternal: this.taskConfig.publishFolderForInternal,
196+
publishFolderForBeta: this.taskConfig.publishFolderForBeta,
197+
publishFolderForPublic: this.taskConfig.publishFolderForPublic
163198
};
164199
}
165200

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@
3434
"dtsRollupTrimming": {
3535
"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.",
3636
"type": "boolean"
37+
},
38+
"publishFolderForInternal": {
39+
"description": "This setting is only used if \"dtsRollupTrimming\" is true. It indicates the folder where \"npm publish\" will be run for an internal release. The default value is \"./dist/internal\". An internal release will contain all definitions that are reachable from the entry point.",
40+
"type": "string"
41+
},
42+
"publishFolderForBeta": {
43+
"description": "This setting is only used if \"dtsRollupTrimming\" is true. It indicates the folder where \"npm publish\" will be run for a beta release. The default value is \"./dist/beta\". A beta release will contain all definitions that are reachable from the entry point, except definitions marked as @alpha or @internal.",
44+
"type": "string"
45+
},
46+
"publishFolderForPublic": {
47+
"description": "This setting is only used if \"dtsRollupTrimming\" is true. It indicates the folder where \"npm publish\" will be run for a public release. The default value is \"./dist/public\". A public release will contain all definitions that are reachable from the entry point, except definitions marked as @beta, @alpha, or @internal.",
48+
"type": "string"
3749
}
3850
},
3951
"required": [ "enabled" ],

0 commit comments

Comments
 (0)