Looks like node-progress not rendering properly with listr.
Consider running this following code where 2 libs coexist:
const ProgressBar = require('progress');
const Listr = require('listr');
// progress-bar
let bar = new ProgressBar(':bar', { total: 10 });
let timer = setInterval(function() {
bar.tick();
if (bar.complete) {
console.log('\ncomplete\n');
clearInterval(timer);
}
}, 1000);
// listr
const tasks = new Listr([{
title: 'task 1',
task: () => {
return new Promise((resolve) => {
setTimeout(() => {
resolve()
}, 3000)
})
}
},
{
title: 'Task 2',
task: () => {
return new Promise((resolve) => {
setTimeout(() => {
resolve()
}, 3000)
})
}
}
]);
tasks.run().catch(err => {
console.error(err);
});
On the output progress bar blinks periodically..
Looks like node-progress not rendering properly with listr.
Consider running this following code where 2 libs coexist:
On the output progress bar blinks periodically..