Skip to content

Commit 957c995

Browse files
committed
chore: update readme
1 parent f8ee292 commit 957c995

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Your automated markdown maintainer!
1515

1616
## Usage
1717

18-
Automd scans for the `<!-- AUTOMD_START --> ... <!-- AUTOMD_END -->` comments within the markdown document and update their contents using generators.
18+
Automd scans for the annotation comments within the markdown document and updates their contents using built-in generators.
1919

2020
The syntax is like this:
2121

2222
```md
23-
<!-- AUTOMD_START generator="<generator name>" [... generator args] -->
23+
<!-- AUTOMD_START generator="jsdocs" [...args] -->
2424

2525
...
2626

@@ -29,42 +29,45 @@ The syntax is like this:
2929

3030
### Using CLI
3131

32-
Easiest way to use automd, is to use the CLI. You can install automd or run `npx automd` in your project.
33-
34-
By default, `README.md` file in current working directory will be checked.
35-
36-
You can use `--dir` and `--file` arguments to customize default beavior to operate on any other markdown file.
32+
The easiest way to use automd is to use the CLI. You can install automd and add it to the `build` or `release` command in `package.json` or directly run `npx automd` in your project.
3733

3834
```sh
3935
npx automd@latest
4036
```
4137

38+
By default, the `README.md` file in the current working directory will be used as the target.
39+
40+
You can use `--dir` and `--file` arguments to customize the default behavior to operate on any other markdown file.
41+
4242
### Programmatic API
4343

4444
[WIP]
4545

4646
## Generators
4747

48-
There are several available generators for automd each supporting different aguments. See [issues](https://github.com/unjs/automd/issues?q=is%3Aopen+is%3Aissue+label%3Agenerator) for proposed generators and feel free to suggest any generator ideas to be included!
48+
There are several available generators for automd each supporting different arguments.
49+
50+
See [open issues](https://github.com/unjs/automd/issues?q=is%3Aopen+is%3Aissue+label%3Agenerator) for proposed generators and feel free to suggest any generator ideas to be included!
4951

5052
### `jsdocs` Generator
5153

52-
jsdocs generator can automatically read through your code and extract documentation of function exports leveraging JSDocs and TypeScript hints.
54+
jsdocs generator can automatically read through your code and extract and sync documentation of function exports leveraging JSDocs and TypeScript hints.
5355

5456
Internally it uses [untyped](https://untyped.unjs.io/) and [jiti](https://github.com/unjs/jiti) loader for JSDocs parsing and TypeScript support.
5557

5658
#### Usage
5759

5860
```md
59-
## Utils
60-
6161
<!-- AUTOMD_START generator="jsdocs" src="./src/index" -->
62+
63+
...
64+
6265
<!-- AUTOMD_END -->
6366
```
6467

6568
(make sure to have some utility exports in `src/index.ts` annotated with JSDocs.)
6669

67-
#### Example Output
70+
**Example Output:**
6871

6972
## Utils
7073

@@ -81,11 +84,11 @@ Internally it uses [untyped](https://untyped.unjs.io/) and [jiti](https://github
8184

8285
<!-- AUTOMD_END -->
8386

84-
### Args
87+
### Args supported for `jsdocs`
8588

8689
- `src`: Path to the source file. The default is `./src/index` and can be omitted.
87-
- `headingLevel`: Nested level for markdown group headings (default is `2` => `##`). Note: Each function uses `headingLevel+1` for title in nested levels.
88-
- `group`: Only render function exportes anotated with `@group name`. By default there is no group filter. Value can be an string or array of strings.
90+
- `headingLevel`: Nested level for markdown group headings (default is `2` => `##`). Note: Each function uses `headingLevel+1` for the title in nested levels.
91+
- `group`: Only render function exportes annotated with `@group name`. By default, there is no group filter. Value can be a string or array of strings.
8992

9093
## Development
9194

0 commit comments

Comments
 (0)