-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
26 lines (19 loc) · 783 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// const program = require('commander');
// program
// .option('-d, --debug', 'output extra debugging')
// .option('-s, --small', 'small pizza size')
// .option('-p, --pizza-type <type>', 'flavour of pizza');
// program.parse(process.argv);
// console.log('program.debug',program.opts());
// if (program.debug) console.log(program.opts());
// console.log('pizza details:');
// if (program.small) console.log('- small pizza size');
// if (program.pizzaType) console.log(`- ${program.pizzaType}`);
const program = require('commander');
program
.command('clone <source> [destination...]')
.description('clone a repository into a newly created directory')
.action((source, destination) => {
console.log('source',source,destination);
});
program.parse(process.argv);