How to use the cli.spinner function in cli

To help you get started, we’ve selected a few cli 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 DefinitelyTyped / DefinitelyTyped / cli / cli-tests.ts View on Github external
setTimeout(function () {
    cli.spinner('Working.. done!', true); //End the spinner
}, 3000);
github mozilla / qbrt / bin / install-xulapp.js View on Github external
'defaults',
    'devtools.manifest',
    'modules',
  ];

  return pify(fs.ensureDir)(targetDir)
  .then(() => {
    return Promise.all(files.map(file => pify(fs.copy)(path.join(sourceDir, file), path.join(targetDir, file))));
  });
}

module.exports = installXULApp;

if (require.main === module) {
  let exitCode = 0;
  cli.spinner('  Installing XUL app …');
  installXULApp()
  .then(() => {
    cli.spinner(chalk.green.bold('✓ ') + 'Installing XUL app … done!', true);
  })
  .catch(error => {
    exitCode = 1;
    cli.spinner(chalk.red.bold('✗ ') + 'Installing XUL app … failed!', true);
    console.error(error);
  })
  .finally(() => {
    process.exit(exitCode);
  });
}
github 96AA48 / gmplayer / download.js View on Github external
lastDownload.then(() => {
      cli.spinner('', true);
      if (cli.options.downloadonly) {
        utils.writePlaylist(m3uWriter, album);
        process.exit();
      }
      return utils.writePlaylist(m3uWriter, album);
    }).then(deferred.resolve);
  });
github 96AA48 / gmplayer / lookup.js View on Github external
function album(query) {
  var deferred = Q.defer();

  cli.spinner('Looking up requested album');

  search(query, filters.onlyAlbums).then((results) => {
    process.stdout.write('\n');

    if (!cli.options.library) {
      results.forEach((entry, index) => {
        console.log(chalk.yellow('[') + index + chalk.yellow('] ') + chalk.white(entry.album.name) + ' - ' + chalk.grey(entry.album.artist));
      });
    }
    else {
      results.forEach((entry, index) => {
        console.log(chalk.yellow('[') + index + chalk.yellow('] ') + chalk.white(entry.name) + ' - ' + chalk.grey(entry.artist));
      });
    }

    var input = readline.questionInt('What album do you want to play? #');
github jamesshore / object_playground / node_modules / cli / examples / spinner.js View on Github external
setTimeout(function () {
    cli.spinner('Working.. done!', true); //End the spinner
}, 3000);
github mozilla / qbrt / bin / install-runtime.js View on Github external
.then(() => {
    cli.spinner(chalk.green.bold('✓ ') + 'Installing runtime … done!', true);
  })
  .catch(error => {
github mozilla / oghliner / lib / integrate.js View on Github external
function startSpinner(message) {
  spinnerMessage = message;
  cli.spinner('  ' + message);
}
github mozilla / qbrt / bin / postinstall.js View on Github external
.then(() => {
  cli.spinner('  Installing runtime …');
})
.then(installRuntime)