Skip to content

Commit 512d3a2

Browse files
committed
update README.md + add .markdownlint.json [skip publish]
1 parent 18ce068 commit 512d3a2

2 files changed

Lines changed: 16 additions & 17 deletions

File tree

.markdownlint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"no-duplicate-heading": {
3+
"allow_different_nesting": true
4+
},
5+
"line-length": {
6+
"line_length": 100,
7+
"tables": false,
8+
"code_blocks": false
9+
}
10+
}

README.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,17 @@ import massarg from "massarg" // import init function (returns massarg instance)
3232
import { Massarg } from "massarg" // import class
3333
```
3434
35-
## Initializing
35+
## Quick Start
3636
3737
Call the default export function `massarg`, or create a new instance manually using `new Massarg()`,
3838
and then you can start chaining commands. Use `.parse()` to do the final parsing and run the
3939
commands and options.
4040
41-
```typescript
42-
massarg()
43-
.option(...)
44-
.command(...)
45-
.help(...)
46-
.main(...)
47-
.parse()
48-
```
49-
50-
## Quick Start
51-
5241
Here is an example with some commonly used examples to get you started. Keep reading for a complete
5342
documentation of every option.
5443
5544
```typescript
56-
massarg()
45+
massarg() // or: new Massarg()
5746
.main((options) => console.log("main command", options))
5847
.command({
5948
name: "sub",
@@ -113,7 +102,7 @@ Any arguments that are not taken by options or commands, are automatically passe
113102
`options.extra`, which you can access when running a command or when using the return value from
114103
`parseArgs()`.
115104

116-
#### Options
105+
### Options
117106

118107
| Name | Type | Required | Example | Description |
119108
| ------------- | --------------------------- | -------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
@@ -157,7 +146,7 @@ Any arguments that are not taken by options or commands, are automatically passe
157146
`options.extra`, which you can access when running a command or when using the return value from
158147
`parseArgs()`.
159148

160-
#### Options
149+
### Options
161150

162151
| Name | Type | Required | Default | Example | Description |
163152
| ------------- | --------------------------------- | -------- | -------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -212,7 +201,7 @@ above the footer.
212201
The examples consist of inputs, outputs, and optional descriptions. The descriptions are displayed
213202
atop as titles, if specified.
214203

215-
#### Options
204+
### Options
216205

217206
| Name | Type | Required | Default | Example | Description |
218207
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
@@ -237,7 +226,7 @@ massarg().example({
237226
You can modify some of the styles and behavior of the help text. None of the options are required,
238227
you may override their defaults to modify the behavior.
239228

240-
#### Options
229+
### Options
241230

242231
| Name | Type | Default | Description |
243232
| ---------------------- | -------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)