Class: CLI
The main entry point for the CLI.
Extends
CLIBase
Constructors
Constructor
new CLI():
CLI
Returns
CLI
Inherited from
CLIBase.constructor
Methods
execute()
execute(
options,localesDirectory,argv):Promise<number>
Execute the command line processing.
Parameters
options
ICliOptions
The options for the CLI.
localesDirectory
string | string[]
The locales to load, each entry is either a path to a locales directory or the name of an installed package to take the locales from. Entries are merged in order, so later entries override earlier ones.
argv
string[]
The process arguments.
Returns
Promise<number>
The exit code.
Inherited from
CLIBase.execute
getCommands()
protectedgetCommands(program):Command[]
Get the commands for the CLI, override in derived class to supply your own.
Parameters
program
Command
The main program that the commands will be added to.
Returns
Command[]
The commands for the CLI.
Inherited from
CLIBase.getCommands
run()
run(
argv,localesDirectory?,options?):Promise<number>
Run the app.
Parameters
argv
string[]
The process arguments.
localesDirectory?
string | string[]
The locales to load, either paths to locales directories or names of installed packages, defaults to relative to the script.
options?
Additional options.
overrideOutputWidth?
number
Override the output width.
Returns
Promise<number>
The exit code.
configureRoot()
protectedconfigureRoot(program):void
Configure any options or actions at the root program level.
Parameters
program
Command
The root program command.
Returns
void
Overrides
CLIBase.configureRoot