You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
top level command is created by `commandpost.create` function.
57
+
A top-level command is created by the`commandpost.create` function.
58
58
59
-
commandpost can have a sub command.
60
-
sub command is created by `topLevelCommand.subCommand` method.
61
-
like [this](https://github.com/vvakame/commandpost/blob/master/example/usage.ts#L36).
59
+
commandpost also supports sub-commands.
60
+
A sub-command is created by using the`topLevelCommand.subCommand` method.
61
+
Refer to [this](https://github.com/vvakame/commandpost/blob/master/example/usage.ts#L36) example for a demonstration.
62
62
63
-
commandpost can configure several items.
64
-
e.g. version information, app description, CLI usage and help message.
65
-
I recommend that you should setup `.version` and `.description`.
66
-
Usually, automatic generated help message satisfy you.
63
+
commandpost can automatically generate help and command usage messages based on your configuration. For best results, it is recommended that you should set `.version` and `.description` for your top-level command.
67
64
68
-
### Option
65
+
66
+
### Options
69
67
70
68
```
71
-
// shorthand style & formal style option with required parameter. option value is convert to string[].
69
+
// shorthand & formal option with a required parameter. value is converted to string[].
72
70
cmd.option("-c, --config <configFile>", "Read setting from specified config file path");
73
71
74
-
// option with optional parameter. option value is convert to string[].
72
+
// option with optional parameter. value is converted to string[].
75
73
cmd.option("-c, --config [configFile]", "Read setting from specified config file path");
76
74
77
-
// option without parameter. option value is convert to boolean. default false.
75
+
// option without parameter (flag). option value is converted to boolean and defaults to `false`.
0 commit comments