bokub / chalk-animation

:clapper: Colorful animations in terminal output
MIT License
2.13k stars 71 forks source link

[Question] Can I use with ora? #5

Closed gluons closed 7 years ago

gluons commented 7 years ago

Thank you very much for making the awesome tool. But I have a question.

Is it possible to use with ora?

It should be 😎 cool if I can it these together.

bokub commented 7 years ago

I don't know, what would you like to do? Could you give an example?

gluons commented 7 years ago

Something like this 😁

bokub commented 7 years ago

You can hack it to make it work like you want (a little bit tricky):

const spinner = require('ora')(' ');
const rainbow = require('chalk-animation').rainbow('hello world').stop();

setInterval(() => {
    spinner.text = rainbow.frame().substring(11);
    spinner.render();
}, 50);

N.B: frame() is only available in the last version of chalk-animation

gluons commented 6 years ago

Awesome! It's beautiful. 😻

chalk-animation-ora

latel commented 6 years ago

awesome