Terminal loading effect.
$ npm install --save loading-cli
var loading = require('loading-cli'); var load = loading("loading text!!") load.start() setTimeout(function(){ load.color = 'yellow'; load.text = ' Loading rainbows'; },2000) // stop setTimeout(function(){ load.stop() },3000)
load({ "text":"loading text!!", "color":"yellow", "interval":100, "stream": process.stdout, "frames":["◰", "◳", "◲", "◱"] })
Type: string Text to display after the spinner.
loading("loading text!!")
Values: black
red
green
yellow
blue
magenta
cyan
white
gray
["◰", "◳", "◲", "◱"] ["◐", "◓", "◑", "◒"] [".", "o", "O", "°", "O", "o", "."] ["⊶", "⊷"] ["ဝ", "၀"] ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"] [":clock1: ", ":clock2: ", ":clock3: ", ":clock4: ", ":clock5: ", ":clock6: ", ":clock7: ", ":clock8: ", ":clock9: ", ":clock10: ", ":clock11: "]
Start the spinner. Returns the instance.
Stop and clear the spinner. Returns the instance.
Clear the spinner. Returns the instance.
Manually render a new frame. Returns the instance.
Get a new frame.
Change the text.
Change the spinner color.