diff --git a/.rczrc b/.rczrc index ea4301a..8ecc533 100644 --- a/.rczrc +++ b/.rczrc @@ -3,6 +3,7 @@ "commands", "changelog", "readme", - "release" + "release", + "config" ] } diff --git a/README.md b/README.md index 043a821..ce81777 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Resultium commit standardization library ## Configuration -You can create an `.rczrc` file in your root directory and specify available scopes and commit types +You can create an `.rczrc`, `.rczrc.json` or `rcz.config.json` file in your root directory and specify available scopes and commit types ```json { diff --git a/src/index.ts b/src/index.ts index 18c9913..b6549db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,6 +24,18 @@ const GetConfig = async () => { await fs.promises.readFile(path.join(process.cwd(), ".rczrc")) ).toString() ) as Config; + } else if (fs.existsSync(path.join(process.cwd(), ".rczrc.json"))) { + return JSON.parse( + ( + await fs.promises.readFile(path.join(process.cwd(), ".rczrc.json")) + ).toString() + ) as Config; + } else if (fs.existsSync(path.join(process.cwd(), "rcz.config.json"))) { + return JSON.parse( + ( + await fs.promises.readFile(path.join(process.cwd(), "rcz.config.json")) + ).toString() + ) as Config; } else { return null; }