Skip to content

Commit 93d23b6

Browse files
committed
Add help command
1 parent e4e9cbe commit 93d23b6

File tree

2 files changed

+42
-24
lines changed

2 files changed

+42
-24
lines changed

README.md

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -159,33 +159,26 @@ you can use the `include` property,
159159

160160
### CLI
161161

162-
The `blobpack` command supports passing options:
163-
164-
```
165-
$ blobpack --version
166-
$ blobpack version
167162
```
168163

169-
```
170-
$ blobpack install \
171-
--config-path ./package.json \
172-
--tmp-root ./tmp
173-
```
164+
Usage: blobpack [command] [options]
165+
166+
167+
Commands:
168+
169+
install Download Benthos .zip
170+
build Build .zip artifacts
171+
help Display help
172+
173+
Options:
174+
175+
--version Output the version number
176+
--config-path Path to the JSON file containing the blobpack config
177+
--tmp-root Path to tmp working directory
178+
--config-root Path to the directory containing the artifact configs
179+
--resources-root Path to the directory all resources are relative to
180+
--dist-root Path to the directory to output artifacts
174181

175-
```
176-
$ blobpack \
177-
--config-path ./package.json \
178-
--tmp-root ./tmp \
179-
--config-root ./config \
180-
--resources-root ./ \
181-
--dist-root ./dist
182-
183-
$ blobpack build \
184-
--config-path ./package.json \
185-
--tmp-root ./tmp \
186-
--config-root ./config \
187-
--resources-root ./ \
188-
--dist-root ./dist
189182
```
190183
191184
## Development and Testing

bin/blobpack.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,28 @@ if (args._[0] === 'build' || args._[0] == null) {
4040
distRoot: args['--dist-root']
4141
})
4242
}
43+
44+
const docs = `
45+
Usage: blobpack [command] [options]
46+
47+
48+
Commands:
49+
50+
install Download Benthos .zip
51+
build Build .zip artifacts
52+
help Display help
53+
54+
Options:
55+
56+
--version Output the version number
57+
--config-path Path to the JSON file containing the blobpack config
58+
--tmp-root Path to tmp working directory
59+
--config-root Output the version number
60+
--resources-root Output the version number
61+
--dist-root Output the version number
62+
`
63+
64+
if (args._[0] === 'help') {
65+
// eslint-disable-next-line no-console
66+
console.log(docs)
67+
}

0 commit comments

Comments
 (0)