Changelog
3.1.1 (February 7, 2022)
3.1.0
for short options which can't be used with a parameter when not in a short options sequenceChangelog
3.1.0 (February 7, 2022)
command()
function by removing parameters except the first one, since others are not used anymorecommand("name", "[arg1] [arg2]")
) to avoid mistakes on migration from v2.0-
as a value for argChangelog
3.0.0 (December 12, 2021)
chalk
with ansi-colors
^12.20.0
, ^14.13.0
and >=15.0.0
Changelog
3.0.0-beta.1 (February 14, 2020)
Command#extend()
Command
's constructor and Command#command(method)
to take usage
only (i.e. command('name [param]')
instead command('name', '[param]')
)Command#clone()
methodCommand#getCommand(name)
and Command#getCommands()
methodsCommand#getOption(name)
and Command#getOptions()
methodsCommand#messageRef()
and Option#messageRef()
methodsCommand#createOptionValues(values)
methodCommand#help()
method similar to Command#version()
, use Command#help(false)
to disable default help action optionCommand#showHelp()
, it's now logs help message in console instead of returning itCommand#showHelp()
into Command#outputHelp()
Command
to store params info (as Command#params
) even if no paramsCommand#infoOption()
method, use action
in option's config instead, i.e. option(usage, description, { action: ... })
Command#infoOptionAction
and infoOptionAction
option for Command
constructor as wellCommand#shortcut()
method, use shortcut
in option's config instead, i.e. option(usage, description, { shortcut: ... })
Command#command()
to raise an exception when subcommand name already in useCommand#setOptions()
methodCommand#setOption()
methodCommand#hasOptions()
methodCommand#hasOption()
methodCommand#hasCommands()
methodCommand#normalize()
method (use createOptionValues()
instead)Option
to store params info as Option#params
, it always an object even if no paramsOption#names()
methodargv
parse handlers to [init()
→ applyConfig()
→ prepareContext()
]+ → action()
getCommandHelp()
functionParams
classArgument
classcolor
optionChangelog
2.0.0 (December 8, 2019)
Command
and create a function
defaultHelp
option to prevent adding --help
option on command createinfoOptionAction
option to override action when info option involved (output to stdout and exit(0)
by default)Command#infoOption()
methodcreate()
method to command()
error()
methodconfirm()
methodChangelog
1.2.2 (September 18, 2017)
Command#args()
, now it's a command as expected (#10)--
concats with arguments before --
)Changelog
1.2.1 (September 18, 2017)