async-chainable-progress
Version:
Plugin for async-chainable that adds progress bars, spinners and other widgets
28 lines (26 loc) • 789 B
JavaScript
var async = require('async-chainable');
var asyncProgress = require('../');
async()
.use(asyncProgress)
.spinner('Thinking...')
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner('Ruminating...')
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner('Cogitating...')
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.spinner()
.then(function(next) { setTimeout(next, 100) })
.progressComplete()
.end();