Thursday, 1 June 2017

how can I put string in input buffer manually?

I'm using ora and inquirer to make command line tool. but when I use inquirer after ora spinner, It doesn't show up the questions without putting some key input (especially with ora). so I'm looking for a way to put key bind manually but still can't find it. I tried stdin.write but It didn't work out. Here's my code

const spinner = new Ora({
    text: 'Logging into Twitter..'
});

spinner.start()

await setTimeout(() => {
    spinner.text = 'Successfully logged in to twitter!'
}, 1000)

await setTimeout(() => {
    spinner.succeed()
}, 1000)



await inquirer.prompt(question[1])



via Phillip YS

No comments:

Post a Comment