How to use the cli-spinners.hamburger function in cli-spinners

To help you get started, we’ve selected a few cli-spinners examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost-CLI / lib / ui / spinner.js View on Github external
Spinner = function Spinner(options) {
    options = assign({
        color: 'green',
        text: '',
        stream: process.stderr
    }, options || {});

    this.text = options.text;
    this.color = options.color;
    this.spinner = (process.platform === 'win32') ? spinners.line :
        (spinners[options.spinner] || spinners.hamburger);

    this.interval = this.spinner.interval || 100;
    this.stream = options.stream;
    this.id = null;
    this.frameIndex = 0;
    this.enabled = options.enabled || ((this.stream && this.stream.isTTY) && !process.env.CI);
};