* Run compodoc from the command line.
()
| 34 | * Run compodoc from the command line. |
| 35 | */ |
| 36 | protected async start(): Promise<any> { |
| 37 | defineCliFlags(program).parse(process.argv); |
| 38 | |
| 39 | const outputHelp = () => { |
| 40 | program.outputHelp(); |
| 41 | process.exit(1); |
| 42 | }; |
| 43 | |
| 44 | const programOptions = program.opts(); |
| 45 | const { configFile, configExplorerResult } = loadCliConfiguration( |
| 46 | programOptions.config, |
| 47 | process.cwd(), |
| 48 | ); |
| 49 | const configuredFilePatterns = applyCliConfiguration( |
| 50 | Configuration.mainData, |
| 51 | configFile, |
| 52 | programOptions, |
| 53 | { scannedFiles, excludeFiles, includeFiles }, |
| 54 | ); |
| 55 | |
| 56 | scannedFiles = configuredFilePatterns.scannedFiles; |
| 57 | excludeFiles = configuredFilePatterns.excludeFiles; |
| 58 | includeFiles = configuredFilePatterns.includeFiles; |
| 59 | |
| 60 | printStartupBanner({ |
| 61 | isWatching: this.isWatching, |
| 62 | isLlmMdStdoutMode: |
| 63 | Configuration.mainData.exportFormat === "llm-md" && |
| 64 | !Configuration.mainData.outputProvided, |
| 65 | loggerSilent: logger.silent, |
| 66 | workingDirectory: cwd, |
| 67 | }); |
| 68 | |
| 69 | if (configExplorerResult) { |
| 70 | if (typeof configExplorerResult.config !== "undefined") { |
| 71 | logger.info( |
| 72 | `Using configuration file : ${configExplorerResult.filepath}`, |
| 73 | ); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | if (!configExplorerResult) { |
| 78 | logger.warn(`No configuration file found, switching to CLI flags.`); |
| 79 | } |
| 80 | |
| 81 | if ( |
| 82 | programOptions.language && |
| 83 | !I18nEngine.supportLanguage(programOptions.language) |
| 84 | ) { |
| 85 | logger.warn( |
| 86 | `The language ${programOptions.language} is not available, falling back to ${I18nEngine.fallbackLanguage}`, |
| 87 | ); |
| 88 | } |
| 89 | |
| 90 | if ( |
| 91 | programOptions.tsconfig && |
| 92 | typeof programOptions.tsconfig === "boolean" |
| 93 | ) { |
no test coverage detected