1 | var inquirer = require("inquirer");
|
2 | var program = require('commander');
|
3 |
|
4 | program
|
5 | .version('0.0.1')
|
6 | .option('-j, --job [jobName]', 'Job to execute', 'default')
|
7 | .option('-d, --debug', 'Debug mode', false)
|
8 | .option('-i, --info', 'Info mode', false)
|
9 | .parse(process.argv);
|
10 |
|
11 | inquirer.prompt([
|
12 | {
|
13 | type: "list",
|
14 | name: "theme",
|
15 | message: "Select a option?",
|
16 | choices: [
|
17 | "Option 1",
|
18 | "Option 2",
|
19 | "Option 3",
|
20 | new inquirer.Separator(),
|
21 | "ReConfigure"
|
22 | ]
|
23 | },
|
24 | {
|
25 | type: "list",
|
26 | name: "size",
|
27 | message: "What size do you need",
|
28 | choices: [ "Jumbo", "Large", "Standard", "Medium", "Small", "Micro" ],
|
29 | filter: function( val ) { return val.toLowerCase(); }
|
30 | }
|
31 | ], function( answers ) {
|
32 | console.log( JSON.stringify(answers, null, " ") );
|
33 | }); |
\ | No newline at end of file |