Skip to content

Instantly share code, notes, and snippets.

@theptrk
Last active January 19, 2019 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theptrk/e6a61559934fbcfa32cfc6e22b03a2d6 to your computer and use it in GitHub Desktop.
Save theptrk/e6a61559934fbcfa32cfc6e22b03a2d6 to your computer and use it in GitHub Desktop.
const chalk = require('chalk')
const inquirer = require('inquirer')
const promptSignup = () => {
const questions = [
{
message: 'Whats hannenin\'??',
name: 'action',
type: 'list',
choices: ['did', 'task']
},
{
message: 'Message',
name: 'message'
}
];
return inquirer.prompt(questions)
}
const run = async () => {
console.log(chalk.green('Welcome to your new tool'))
const { action, message } = await promptSignup();
const entry = `(${action}) - ${message}`
// TODO do something with the entry
}
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment