|
12345678910111213141516171819202122 |
- import { Cli } from './packages/cli-wrapper';
- import { AdderController, AdderControllerImpl } from './modules/adder';
-
- export const addCommands = (cli: Cli) => {
- const adderController: AdderController = new AdderControllerImpl();
-
- return cli
- .command({
- aliases: ['a'],
- command: 'add',
- parameters: ['<a> <b>'],
- describe: 'Add two numbers',
- handler: adderController.addNumbers,
- })
- .command({
- aliases: ['s'],
- command: 'subtract',
- parameters: ['<a> <b>'],
- describe: 'Subtract two numbers',
- handler: adderController.subtractNumbers,
- });
- };
|