()
| 19 | // Add nested commands using `.addCommand(). |
| 20 | // The command could be created separately in another module. |
| 21 | function makeHeatCommand() { |
| 22 | const heat = new Command('heat'); |
| 23 | heat.command('jug').action(() => { |
| 24 | console.log('heat jug'); |
| 25 | }); |
| 26 | heat.command('pot').action(() => { |
| 27 | console.log('heat pot'); |
| 28 | }); |
| 29 | return heat; |
| 30 | } |
| 31 | program.addCommand(makeHeatCommand()); |
| 32 | |
| 33 | program.parse(process.argv); |
no test coverage detected