Skip to content
Myr

Use custom command example to show revert to Commander v6 behaviours (#1421)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by GitHub · parent 20cef03 · Browse files · 3 files+35 added−57 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+35 added−57 removed

  • other:+35 added−57 removed

3 files+35 added−57 removed

modified:examples/custom-command-class.js+34 added-20 removed
deleted:examples/custom-command-function.js-36 removed
modified:Readme.md+1 added-1 removed
720 unmodified lines
721```722723`createCommand` is also a method of the Command object, and creates a new command rather than a subcommand. This gets used internally724when creating subcommands using `.command()`, and you may override it to725customise the new subcommand (examples using [subclass](./examples/custom-command-class.js) and [function](./examples/custom-command-function.js)).725customise the new subcommand (example file [custom-command-class.js](./examples/custom-command-class.js)).726727### Import into ECMAScript Module728729Commander is currently a CommonJS package, and the default export can be imported into an ES Module:
148 unmodified lines