How to use the cli.info 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 simontabor / serenity / lib / converter.js View on Github external
str = str.replace(/<% capture %>(.*?)<% endcapture %>/g,function(s,main) {
    cli.info('CAPTURE');
    console.log(main);
    return '<% /* '+'capture'+' */ %>'; // commend out captures for now
  });
  str = str.replace(/<% for (.*?) { %>((.|\n)*?)<% endfor %>/g,function(s,statement,main) {
github simontabor / serenity / lib / converter.js View on Github external
str = str.replace(/<% for (.*?) { %>((.|\n)*?)<% endfor %>/g,function(s,statement,main) {
    cli.info('FOR LOOP');
    var vars = statement.split(' ');
    vars.shift(); //remove var
    var orig = vars.shift();
    if (vars[0] == 'in') vars.shift();
    var variable = (vars[0].charAt(0) == '(' && vars[0].charAt(vars[0].length -1) == ')') ? vars[0].substr(1,vars[0].length-2) : vars[0];// remove brackets

    var predefined = variable.split('..');
    if (predefined[1]) {
      // this is a predefined loop
      return '<% for (var '+orig+'='+predefined[0]+'; '+orig+'<'+predefined[1]+'; '+orig+'++) {'+
      main+
      '<% } %>';
    }

    var limit = variable+'.length';
    if (statement.split('limit:')[1]) {
github simontabor / serenity / lib / converter.js View on Github external
str = str.replace(/<% switch (.*?) { %>((.|\n)*?)<% endswitch %>/g,function(s,statement,main) {
    cli.info('SWITCH');
    console.log(statement,main);
    return '<% /* '+main+' */%>';
  });
  return str;
github simontabor / serenity / convert.js View on Github external
str = str.replace(/<% switch (.*?) { %>((.|\n)*?)<% endswitch %>/g,function(s,statement,main) {
    cli.info('SWITCH');
    console.log(statement,main);
    return '<% /* '+main+' */%>';
  });
  return str;
github slively / loopback-discover-models / cli.js View on Github external
dataSource.discoverModelDefinitions(discoveryOptions, function(err, models){
            if (err) {
                cli.fatal(err);
            } else if (!models || models.length === 0) {
                cli.info('No models found in data source with options:',JSON.stringify(discoveryOptions));
                process.exit();
            }

            var callCnt = models.length;

            models.forEach(function (def) {
                dataSource.discoverSchema(def.name, { owner: discoveryOptions.owner }, function (err, schema) {
                    if (err) {
                        cli.fatal(err);
                    }

                    // doesn't already exist and not skipping
                    if (currentModels.indexOf(schema.name.toLowerCase()) === -1) {
                        if (skips.indexOf(schema.name.toLowerCase()) === -1) {
                            cli.ok('Writing new model files for ' + schema.name);
                            writeFilesForModelSchema(schema);
github simontabor / serenity / lib / Generator.js View on Github external
Generator.prototype.run = function(files, cb) {
  var self = this;

  if (self.freeWorkers.length !== Object.keys(cluster.workers).length) {
    cli.info('Not all workers are free - waiting to regenerate');
    setTimeout(self.run.bind(self, files, cb), 1000);
  }

  cli.info('Generating site');

  var _cb = function() {
    _cb = function(){};
    cb.apply(this, arguments);
  };

  self.deleteSite(function() {
    self.cacheAssets = {};
    self.process(files, _cb);
  });
};
github AdobeXD / xdpm / commands / watch.js View on Github external
}, 250));

        return Object.assign({}, result, {
            "ok": `Watching ${metadata.name}...`
        });
    });

    results.forEach(result => {
        if (result.ok) {
            cli.info(result.ok);
        } else {
            cli.error(result.error);
        }
    });

    cli.info(`Watching... press BREAK (CTRL+C) to exit.`)
}
github jokeyrhyme / cdn-sync / index.js View on Github external
try {
      config = Config.fromFile(file);
    } catch (err) {
      cli.fatal(err);
    }
    config.validate().fail(function (err) {
      cli.fatal(err);
    });
    config.testTargets().fail(function () {
      cli.fatal('configured target fails basic tests');
    }).done(function () {
      cli.ok('configured targets pass basic tests');
      dfrd.resolve(config);
    });
  } else {
    cli.info('use `cdn-sync init` to get started');
    cli.fatal('.cdn-sync.json not found for ' + process.cwd());
  }
  return dfrd.promise;
}
github GameMakerDiscord / Rubber / src / cli.ts View on Github external
rubber.clearCache(path).then(() => {
            cli.info("Cleared Project Cache.");
        });
        return;
github jokeyrhyme / cdn-sync / index.js View on Github external
function eachTarget(t, options, done) {
  var actions, info, theseLocalFiles, bar;
  info = function (msg) {
    cli.info(t.label + ': ' + msg);
  };
  t.on('progress', function (action) {
    cli.info(action.toString());
  });

  cli.info('applying "' + t.strategy + '" strategy to local file(s)');
  localFiles.applyStrategy(t.strategy).then(function (files) {
    theseLocalFiles = files;
    info('scanning...');
    t.cdn.once('files.length', function (length) {
      bar = new ProgressBar('[:bar] :current/:total :percent :elapsed :etas', {
        total: length
      });
    });
    t.cdn.on('file:fixed', function () {
      bar.tick();
    });
    return t.cdn.listFiles();
  }).then(function (remoteFiles) {
    actions = new ActionList();
    actions.compareFileLists(theseLocalFiles, remoteFiles);
    info(actions.length + ' synchronisation action(s) to perform');