Skip to content

Commit

Permalink
feat: support config
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 7, 2024
1 parent 8c8df45 commit b05cccb
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 94 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ By default, the `README.md` file in the current working directory will be used a

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

### Configuration

You can specify configuration in `.automdrc` or `automd.config.{js,ts,cjs,mjs,json}` (powered by [unjs/c12](https://c12.unjs.io)).

Example: `automd.config.js`

```ts
/** @type {import("automd").Config} */
export default {
file: "DOCS.md",
};
```

### Programmatic API

[WIP]
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"test:types": "tsc --noEmit --skipLibCheck"
},
"dependencies": {
"c12": "^1.6.1",
"citty": "^0.1.5",
"consola": "^3.2.3",
"destr": "^2.0.2",
Expand Down
2 changes: 2 additions & 0 deletions playground/automd.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** @type {import("automd").Config} */
export default {}
Loading

0 comments on commit b05cccb

Please sign in to comment.