@wcauchois/program-builder > Program
Program class
A built program that can parse arguments and execute a main function against those arguments.
Signature:export default class Program<T> extends ProgramBase
Remarks
Construct a Program using a ProgramBuilder, then call Program.exec() to execute your main function.
Example:
const program = ProgramBuilder.newBuilder().build();program.exec(args => {// Do things with args});
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | Constructs a new instance of the
|
Methods
Method | Modifiers | Description |
---|---|---|
exec(main, rawArgs) | ||
execOrThrow(main, rawArgs, extraUsage) | ||
generateHelpText(extraUsage) | ||
parseArgs(rawArgs) |