busy-cylon

1.0.6 • Public • Published

Busy Cylon

===================


A nifty little cylon, to run in the terminal; to let you know that your process is still working, and not frozen.

Basically,

an alternative to the 3 dots...

demo

const cylon = require('busy-cylon');
 
 
console.log('turning cylon on');
// vvvvvvvvv
cylon.run();
setTimeout(function () {
    // vvvvvvvvv
    cylon.off();
    // vvvvvvvvv
    cylon.conf({
        color: '#281fdd',
        msg: '\n\njibberish\n    for\n        my \ntest\n\n',
        msgColor: '#4bd64c',
        width: 25,
        pre: 16,
        ms: 40
    });
    console.log('cylon is off');
    setTimeout(function () {
        console.log('turning cylon on');
        // vvvvvvvvv
        cylon.run();
        setTimeout(function () {
 
            // vvvvvvvvv
            cylon.off();
            cylon.conf({
                color: '#bc1fdd',
                msg: '\n\njibberish\n    for\n        my \ntest\n\n',
                msgColor: '#d6b84b',
                width: 25,
                pre: 16,
                ms: 40
            });
            cylon.run();
            setTimeout(function(){
                console.log('this line exists 3 times, and serves as a warning of this very thing');
                console.log('this line exists 3 times, and serves as a warning of this very thing');
                console.log('this line exists 3 times, and serves as a warning of this very thing');
 
            },500);
            setTimeout(function () {
 
                // vvvvvvvvv
                cylon.off();
                console.log('cylon is off');
                console.log('you need to turn the cylon off, or he\'ll overwrite terminal lines');
            }, 13000);
        }, 2000);
    }, 2000);
}, 7000);
 

Dependents (0)

Package Sidebar

Install

npm i busy-cylon

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

5.83 MB

Total Files

11

Last publish

Collaborators

  • ameola01