How to use the cli.progress 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
var i = 0, interval = setInterval(function () {
    cli.progress(++i / 100);
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github simontabor / serenity / lib / Generator.js View on Github external
Generator.prototype.process = function(files, cb) {
  var self = this;

  var ejsFiles = files.filter(function(f) { return f.slice(-4) === '.ejs'; });
  var otherFiles = files.filter(function(f) { return ejsFiles.indexOf(f) === -1; });

  if (files.length > 1) cli.progress(0);

  var doneCount = 0;

  var processGroup = function(group, done) {
    async.eachLimit(group, Object.keys(cluster.workers).length, function(f, dun) {
      self.processFile(f, false, function() {
        if (files.length > 1) cli.progress(++doneCount / files.length);
        dun.apply(this, arguments);
      });
    }, done);
  };

  async.series([
    processGroup.bind(this, otherFiles),
    processGroup.bind(this, ejsFiles)
  ], cb);
github 96AA48 / gmplayer / download.js View on Github external
utils.metadata(songPath, trk, () => {
                    if (cli.options.song && cli.options.downloadonly) process.exit();
                    if (cli.options.album) cli.progress(++cli.album.size/ cli.album.total);
                    deferred.resolve(songPath);
                  });
              });
github nodearch / arch / lib / downloader.js View on Github external
function onData(data, size) {
      cli.progress( (size * (100 / totalSize) / 100) );
    }
github jamesshore / object_playground / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github guardian / pasteup / build / node_modules / jshint / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github victorporof / Sublime-JSHint / scripts / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github RadLikeWhoa / Countable / node_modules / gulp-jshint / node_modules / jshint / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github MaayanLab / geo2enrichr / scripts / node_modules / grunt-contrib-jshint / node_modules / jshint / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github lmammino / flickr-set-get / flickr-set-get.js View on Github external
api.on('setInfo', function(info) {
    cli.info('Downloading ' + info.total + ' photos from "' + info.title + '" by ' + info.ownername);
    numPhotos = info.total;
    cli.progress(0);
  });