node-progress
node-progress copied to clipboard
Can I get example for providing option 'stream' in creation of progress bar
# bar.coffee
ProgressBar = require 'progress'
bar = new ProgressBar ':bar',
total : 10
stream : process.stderr
timer = setInterval ->
bar.tick()
if bar.complete
console.error '\ncomplete\n'
clearInterval timer
, 100
coffee bar.coffee 2> /dev/null will hide the processbar and the message because I redirect the stderr output to /dev/null. By default, the script uses the stderr output but you could also use the stdin (default output on terminal).
bar = new ProgressBar ':bar',
total : 10
stream : process.stdout
@mindfireon812
Did @cmizzi advice help you?
Up to some extent.