Skip to content

Instantly share code, notes, and snippets.

@theptrk theptrk/index.js
Last active Jan 19, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.