4
4
import { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine' ;
5
5
import { BaseAction } from './BaseAction' ;
6
6
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter' ;
7
- import path from 'path' ;
8
- import { DocumenterConfig } from '../documenters/DocumenterConfig' ;
9
- import { FileSystem } from '@rushstack/node-core-library' ;
10
7
11
8
export class MarkdownAction extends BaseAction {
12
9
public constructor ( parser : ApiDocumenterCommandLine ) {
@@ -20,26 +17,12 @@ export class MarkdownAction extends BaseAction {
20
17
}
21
18
22
19
protected async onExecute ( ) : Promise < void > {
23
- let configFilePath : string | undefined = path . join ( process . cwd ( ) , DocumenterConfig . FILENAME ) ;
24
-
25
- // First try the current folder
26
- if ( ! FileSystem . exists ( configFilePath ) ) {
27
- // Otherwise try the standard "config" subfolder
28
- configFilePath = path . join ( process . cwd ( ) , 'config' , DocumenterConfig . FILENAME ) ;
29
- if ( ! FileSystem . exists ( configFilePath ) ) {
30
- console . warn (
31
- `Unable to find ${ DocumenterConfig . FILENAME } in the current folder or in a "config" subfolder`
32
- ) ;
33
- configFilePath = undefined ;
34
- }
35
- }
36
-
37
- const documenterConfig : DocumenterConfig | undefined = configFilePath ? DocumenterConfig . loadFile ( configFilePath ) : undefined ;
20
+ // override
38
21
const { apiModel, outputFolder } = this . buildApiModel ( ) ;
39
22
40
23
const markdownDocumenter : MarkdownDocumenter = new MarkdownDocumenter ( {
41
24
apiModel,
42
- documenterConfig,
25
+ documenterConfig : undefined ,
43
26
outputFolder
44
27
} ) ;
45
28
markdownDocumenter . generateFiles ( ) ;
0 commit comments