From d82c01b0a48a264150b1b4b90e305b72304a337c Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Fri, 10 Feb 2023 12:32:57 -0500 Subject: [PATCH] feat: better config file defaults (#2168) * feat: better config file defaults --- src/lib/utils/options/readers/typedoc.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/utils/options/readers/typedoc.ts b/src/lib/utils/options/readers/typedoc.ts index 5a3ea92af..12d181ed5 100644 --- a/src/lib/utils/options/readers/typedoc.ts +++ b/src/lib/utils/options/readers/typedoc.ts @@ -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 @@ -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()); } }