Last active
March 4, 2016 01:42
-
-
Save developit/ff98fa3df960d92f3024 to your computer and use it in GitHub Desktop.
Demo of ora/cli-spinners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Ora = require('ora'), | |
spinners = require('cli-spinners'); | |
var spinner = new Ora({ | |
text: '' | |
}); | |
var index = 0; | |
var types = Object.keys(spinners); | |
setInterval(function() { | |
var which = types[ (index++)%types.length ]; | |
spinner.stop(); | |
spinner.spinner = spinners[which]; | |
spinner.text = which; | |
spinner.start(); | |
}, 500); | |
spinner.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment