Skip to content

Commit cdb760e

Browse files
author
Anders Brams
committed
Bumped to cilly@1.0.20
1 parent 243bf28 commit cdb760e

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,19 @@ type ArgumentDefinition = {
641641
When printing the `help` text, this is done completely from the `CommandDefinition` objects.
642642
While out of scope for this specific package, one could dream of a package that could take a `CommandDefinition` object and generate a nice looking documentation page :eyes:
643643
644+
Arbitrary data can be appended to dumped command objects using the `.withExtra()` method, e.g.:
645+
646+
```typescript
647+
new CliCommand('build')
648+
.withExtra({
649+
documentationSections: [
650+
{ type: 'title', content: 'Running the build command' },
651+
{ type: 'body', content: 'When running the build command, ...' },
652+
...
653+
]
654+
})
655+
```
656+
644657
Here's an example of a command dump:
645658
646659
```typescript

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cilly",
3-
"version": "1.0.19",
3+
"version": "1.0.20",
44
"description": "The last library you'll ever need for building intuitive, robust and flexible CLI tools with Node.js and TypeScript.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)