X Tutup
Skip to content

Commit 90cf577

Browse files
committed
Update documentation
1 parent 0bca818 commit 90cf577

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

apps/api-extractor/src/api/IConfigFile.ts

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,27 @@ export interface IConfigApiReport {
6262

6363
/**
6464
* Specifies the folder where the API report file is written. The file name portion is determined by
65-
* the "reportFileName" setting.
65+
* the `reportFileName` setting.
6666
*
6767
* @remarks
6868
* The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy,
6969
* e.g. for an API review.
7070
*
71-
* The path is resolved relative to the `projectFolder` location.
71+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
72+
* prepend a folder token such as `<projectFolder>`.
7273
*/
7374
reportFolder?: string;
7475

7576
/**
7677
* Specifies the folder where the temporary report file is written. The file name portion is determined by
77-
* the "reportFileName" setting.
78+
* the `reportFileName` setting.
7879
*
7980
* @remarks
8081
* After the temporary file is written to disk, it is compared with the file in the `reportFolder`.
8182
* If they are different, a production build will fail.
8283
*
83-
* The path is resolved relative to the `projectFolder` location.
84+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
85+
* prepend a folder token such as `<projectFolder>`.
8486
*/
8587
reportTempFolder?: string;
8688
}
@@ -100,11 +102,11 @@ export interface IConfigDocModel {
100102
enabled: boolean;
101103

102104
/**
103-
* The output path for the doc model file.
105+
* The output path for the doc model file. The file extension should be ".api.json".
104106
*
105107
* @remarks
106-
* The file extension should be ".api.json".
107-
* The path is resolved relative to the `projectFolder` location.
108+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
109+
* prepend a folder token such as `<projectFolder>`.
108110
*/
109111
apiJsonFilePath?: string;
110112
}
@@ -131,7 +133,8 @@ export interface IConfigDtsRollup {
131133
*
132134
* If the path is an empty string, then this file will not be written.
133135
*
134-
* The path is resolved relative to the `projectFolder` location.
136+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
137+
* prepend a folder token such as `<projectFolder>`.
135138
*/
136139
untrimmedFilePath?: string;
137140

@@ -141,9 +144,8 @@ export interface IConfigDtsRollup {
141144
* @remarks
142145
* This file will include only declarations that are marked as `@public` or `@beta`.
143146
*
144-
* If the path is an empty string, then this file will not be written.
145-
*
146-
* The path is resolved relative to the `projectFolder` location.
147+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
148+
* prepend a folder token such as `<projectFolder>`.
147149
*/
148150
betaTrimmedFilePath?: string;
149151

@@ -155,7 +157,8 @@ export interface IConfigDtsRollup {
155157
*
156158
* If the path is an empty string, then this file will not be written.
157159
*
158-
* The path is resolved relative to the `projectFolder` location.
160+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
161+
* prepend a folder token such as `<projectFolder>`.
159162
*/
160163
publicTrimmedFilePath?: string;
161164
}
@@ -178,9 +181,12 @@ export interface IConfigTsdocMetadata {
178181
* Specifies where the TSDoc metadata file should be written.
179182
*
180183
* @remarks
184+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
185+
* prepend a folder token such as `<projectFolder>`.
186+
*
181187
* The default value is `<lookup>`, which causes the path to be automatically inferred from the `tsdocMetadata`,
182188
* `typings` or `main` fields of the project's package.json. If none of these fields are set, the lookup
183-
* falls back to `./tsdoc-metadata.json`.
189+
* falls back to `tsdoc-metadata.json` in the package folder.
184190
*/
185191
tsdocMetadataFilePath?: string;
186192
}
@@ -203,9 +209,9 @@ export interface IConfigMessageReportingRule {
203209
logLevel: ExtractorLogLevel;
204210

205211
/**
206-
* If API Extractor is configured to write an API report file (.api.md), then the message will be written
207-
* inside that file. If the API report file is NOT being written, then the message is instead logged according
208-
* to the `logLevel` option.
212+
* When `addToApiReportFile` is true: If API Extractor is configured to write an API report file (.api.md),
213+
* then the message will be written inside that file; otherwise, the message is instead logged according to
214+
* the `logLevel` option.
209215
*/
210216
addToApiReportFile?: boolean;
211217
}
@@ -262,18 +268,23 @@ export interface IExtractorMessagesConfig {
262268
*/
263269
export interface IConfigFile {
264270
/**
265-
* Path to json config file from which config should extend.
266-
* The path specified in this field is relative to current config file path.
271+
* Optionally specifies another JSON config file that this file extends from. This provides a way for
272+
* standard settings to be shared across multiple projects.
273+
*
274+
* @remarks
275+
* If the path starts with `./` or `../`, the path is resolved relative to the folder of the file that contains
276+
* the `extends` field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
277+
* resolved using NodeJS `require()`.
267278
*/
268279
extends?: string;
269280

270281
/**
271-
* The root folder for the project. This folder typically contains the tsconfig.json and package.json
272-
* config files.
282+
* Determines the `<projectFolder>` token that can be used with other config file settings. The project folder
283+
* typically contains the tsconfig.json and package.json config files, but the path is user-defined.
273284
*
274285
* @remarks
275286
*
276-
* The `projectFolder` path is resolved relative to the folder containing api-extractor.json.
287+
* The path is resolved relative to the folder of the config file that contains the setting.
277288
*
278289
* The default value for `projectFolder` is the token `<lookup>`, which means the folder is determined by traversing
279290
* parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder

0 commit comments

Comments
 (0)
X Tutup