MCPcopy
hub / github.com/compodoc/compodoc / start

Method start

src/index-cli.ts:36–296  ·  view source on GitHub ↗

* Run compodoc from the command line.

()

Source from the content-addressed store, hash-verified

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 ) {

Calls 15

processPublicApiMethod · 0.95
defineCliFlagsFunction · 0.90
loadCliConfigurationFunction · 0.90
applyCliConfigurationFunction · 0.90
printStartupBannerFunction · 0.90
readConfigFunction · 0.90
parseMethod · 0.80
setFilesMethod · 0.80
runWebServerMethod · 0.80
testCoverageMethod · 0.80
infoMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected