Created
April 19, 2016 16:15
-
-
Save queerviolet/488c4c18177ea8b61d0c5ca78237e026 to your computer and use it in GitHub Desktop.
Inquirer prompt function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inquirer = require('inquirer') | |
inquirer.prompt([ | |
{ name: 'choice', | |
message: 'Pick a color', | |
type: 'list', | |
choices: [ | |
{name: 'Red', value: '#ff0000'}, | |
{name: 'Green', value: '#00ff00'}, | |
{name: 'Fuchsia', value: '#ff00ff'}, | |
] | |
} | |
]).then(function(answers) { | |
console.log(answers.choice) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment