Skip to content

Commit b05cccb

Browse files
committed
feat: support config
1 parent 8c8df45 commit b05cccb

File tree

12 files changed

+98
-94
lines changed

12 files changed

+98
-94
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ By default, the `README.md` file in the current working directory will be used a
4040

4141
You can use `--dir` and `--file` arguments to customize the default behavior to operate on any other markdown file.
4242

43+
### Configuration
44+
45+
You can specify configuration in `.automdrc` or `automd.config.{js,ts,cjs,mjs,json}` (powered by [unjs/c12](https://c12.unjs.io)).
46+
47+
Example: `automd.config.js`
48+
49+
```ts
50+
/** @type {import("automd").Config} */
51+
export default {
52+
file: "DOCS.md",
53+
};
54+
```
55+
4356
### Programmatic API
4457

4558
[WIP]

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"test:types": "tsc --noEmit --skipLibCheck"
3434
},
3535
"dependencies": {
36+
"c12": "^1.6.1",
3637
"citty": "^0.1.5",
3738
"consola": "^3.2.3",
3839
"destr": "^2.0.2",

playground/automd.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/** @type {import("automd").Config} */
2+
export default {}

0 commit comments

Comments
 (0)