$ npm install --save listr-inquirer
const Listr = require('listr');
const inquirer = require('listr-inquirer');
const list = new Listr([
{
title: 'Retrieving data',
task: (ctx, task) => inquirer([
{
type: 'confirm',
name: 'continue',
message: 'Do you want to continue?'
}
], function (answers) {
if (false === answers.continue) {
task.skip('Skipped')
}
})
}
]);
list.run();
Returns an Observable which asks given set of questions.
Type: array
https://github.com/SBoudrias/Inquirer.js/#question
Type: function
Function that will be invoked when the user has answered the questions
MIT © Original code from listr-input by Sam Verschueren