@@ -72,7 +72,7 @@ npm install @donedeal0/codefather --save-dev
7272 - If a ` .github/CODEOWNERS ` file is present, it will be used to generate the config.
7373 - Accepts two optional flags:
7474 - ` json ` : generates a json config file instead of a ` ts ` one.
75- - ` overwrite ` : overwrite an existing codefather config.
75+ - ` overwrite ` : overwrites an existing codefather config.
7676 - example: ` npm run codefather-init json overwrite `
7777- ` codefather-github ` : similar to ` codefather ` , but designed to run in a GitHub Action environment
7878
@@ -87,8 +87,8 @@ You can either add a script shortcut in your `package.json`:
8787Or directly run the commands with ` npx ` :
8888
8989``` bash
90- npx codefather
9190npx codefather-init
91+ npx codefather
9292```
9393
9494## CONFIG
@@ -188,6 +188,19 @@ git config user.username # return DonCorleone
188188
189189In a Github Action, ` codefather ` will use Github's API, so you don't have to worry about the git config.
190190
191+ ## How to Write Rules
192+
193+ - Match all files in a folder (recursively): ` src/myfolder/ `
194+ - Match a specific file: ` src/myfolder/file.ts `
195+ - Match files by extension in a folder (glob): ` src/folder/*.css `
196+ - Match files by extension in a folder (regex): ` /^src\/folder\/.*\.css$/ `
197+ - Match any file in any subfolder: ` src/** `
198+ - Match any file in the repository: ` ** `
199+ - Match dotfiles: ` .env `
200+ - Use ` * ` for single-level matches, ` ** ` for recursive matches
201+
202+ ℹ️ * More examples are available in the test files. Codefather's matching patterns follow classic file matcher rules, like GitHub CODEOWNERS.*
203+
191204<hr />
192205
193206# GITHUB ACTION
0 commit comments