File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,14 @@ export interface IExtractorConfigPrepareOptions {
136136 * `@microsoft/api-extractor/extends/tsdoc-base.json`.
137137 */
138138 tsdocConfigFile ?: TSDocConfigFile ;
139+
140+ /**
141+ * When preparing the configuration object, folder and file paths referenced in the configuration are checked
142+ * for existence, and an error is reported if they are not found. This option can be used to disable this
143+ * check for the main entry point module. This may be useful when preparing a configuration file for an
144+ * un-built project.
145+ */
146+ ignoreMissingEntryPoint ?: boolean ;
139147}
140148
141149interface IExtractorConfigParameters {
@@ -811,7 +819,7 @@ export class ExtractorConfig {
811819 ) ;
812820 }
813821
814- if ( ! FileSystem . exists ( mainEntryPointFilePath ) ) {
822+ if ( ! options . ignoreMissingEntryPoint && ! FileSystem . exists ( mainEntryPointFilePath ) ) {
815823 throw new Error ( 'The "mainEntryPointFilePath" path does not exist: ' + mainEntryPointFilePath ) ;
816824 }
817825
Original file line number Diff line number Diff line change 1+ {
2+ "changes" : [
3+ {
4+ "packageName" : " @microsoft/api-extractor" ,
5+ "comment" : " Add support for the \" ignoreMissingEntryPoint\" ExtractorConfig option to allow for loading an ExtractorConfig before the target project is built." ,
6+ "type" : " minor"
7+ }
8+ ],
9+ "packageName" : " @microsoft/api-extractor"
10+ }
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ export interface IExtractorConfigLoadForFolderOptions {
243243export interface IExtractorConfigPrepareOptions {
244244 configObject: IConfigFile ;
245245 configObjectFullPath: string | undefined ;
246+ ignoreMissingEntryPoint? : boolean ;
246247 packageJson? : INodePackageJson | undefined ;
247248 packageJsonFullPath: string | undefined ;
248249 projectFolderLookupToken? : string ;
You can’t perform that action at this time.
0 commit comments