Skip to content

Commit

Permalink
feat: better config file defaults (#2168)
Browse files Browse the repository at this point in the history
* feat: better config file defaults
  • Loading branch information
Zamiell committed Feb 10, 2023
1 parent 2953f9c commit d82c01b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lib/utils/options/readers/typedoc.ts
Expand Up @@ -133,7 +133,7 @@ export class TypeDocReader implements OptionsReader {
}

/**
* Search for the typedoc.js or typedoc.json file from the given path
* Search for the configuration file given path
*
* @param path Path to the typedoc.(js|json) file. If path is a directory
* typedoc file will be attempted to be found at the root of this path
Expand All @@ -146,9 +146,17 @@ export class TypeDocReader implements OptionsReader {
return [
path,
join(path, "typedoc.json"),
join(path, "typedoc.jsonc"),
join(path, "typedoc.config.js"),
join(path, "typedoc.config.cjs"),
join(path, "typedoc.js"),
join(path, ".config/typedoc.js"),
join(path, "typedoc.cjs"),
join(path, ".config/typedoc.json"),
join(path, ".config/typedoc.jsonc"),
join(path, ".config/typedoc.config.js"),
join(path, ".config/typedoc.config.cjs"),
join(path, ".config/typedoc.js"),
join(path, ".config/typedoc.cjs"),
].find((path) => FS.existsSync(path) && FS.statSync(path).isFile());
}
}
Expand Down

0 comments on commit d82c01b

Please sign in to comment.