How to use the info function from cli

Find comprehensive JavaScript cli.info code examples handpicked from public code repositorys.

94
95
96
97
98
99
100
101
102
103
const build = options => {
  settings = options
  if (options.display) {
    cli.info(`Path: ${path.resolve(options.cwd, options.src)}`)
    cli.info(`Pattern: ${options.filePattern}`)
    cli.info(`Ignored: ${options.ignore}`)
    cli.info(`Metadata: ${options.metadata}`)
  }

  const distFolder = path.resolve(
fork icon17
star icon83
watch icon3

+ 23 other calls in file

28
29
30
31
32
33
34
35
36
37
  files = cli.args.reduce(function(files, pattern) {
      return files.concat(cli.glob.sync(path.join(cli.options.cwd, pattern)))
  }, [])
}

if (!files.length) return cli.info('No files to convert found. Aborted!')

files.forEach(function(file) {
  fs.stat(file, function(err, stats) {
    if (stats.isFile()) {
fork icon11
star icon52
watch icon4

+ 3 other calls in file

26
27
28
29
30
31
32
33
34
35

app(config, function(err, info, ok) {
  if (err) {
    cli.error(err);
  } else if (info) {
    cli.info(info);
  } else if (ok) {
    cli.ok(ok);
  }
});
fork icon34
star icon0
watch icon2

61
62
63
64
65
66
67
68
69
70
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);
fork icon3
star icon13
watch icon2

+ 3 other calls in file

34
35
36
37
38
39
40
41
42
43
if (options.force) {
  cli.fatal('`init` not implemented yet')
} else {
  fs.access(target, function (err) {
    if (!err) {
      cli.info('remove existing file or use --force')
      cli.fatal(target + ' already exists')
    } else {
      cli.fatal('`init` not implemented yet')
    }
fork icon3
star icon12
watch icon2

+ 13 other calls in file

52
53
54
55
56
57
58
59
60
61
var defer = q.defer();
getSerialIDForCamera(camera).then(function startStream(cameraInfo) {
  //console.log(cameraInfo);
  if(cameraInfo && cameraInfo.name) {
    var port = (parseInt(options.port) + cameraInfo.port_increment * 10);
    cli.info(cameraInfo.name + ' recognized with serial ' + cameraInfo.id + '.\n\tOpened on Port: ' + port);
    var cmd =  'splitter. v4l2src device=' + camera  + ' ! \'video/x-raw, width='+options.width+', height='+options.height+', framerate=' + options.fps + '/1\' ! tee name=' + cameraInfo.gst_tee + ' ! queue ';
        cmd += '! omxvp8enc bitrate=' + options.bitrate + ' ! rtpvp8pay pt=96 ! queue ! udpsink host=' + options.ip + ' bind-port=' + port + ' port=' + port + ' loop=false '+ cameraInfo.gst_tee + '. ';
        cmd += '! queue ! omxh264enc bitrate=' + options.bitrate + ' ! mp4mux ! queue ! filesink location=' + options.filename + '-' + cameraInfo.name.replace(/ /g, '') + '.mp4';
    cli.info(cmd)
fork icon1
star icon4
watch icon8

+ 23 other calls in file

23
24
25
26
27
28
29
30
31
32
    Cli.exec(Cmd, callback, callback);
};

Internals.updateProject = function (name, destination) {

    Cli.info('Updating project ...');

    // Update app package.json

    var Package = Fs.readJsonSync(Path.join(destination, 'package.json'));
fork icon0
star icon2
watch icon3

+ 9 other calls in file

89
90
91
92
93
94
95
96
97
98
      return cb();
    });
  }
}, function(err) {
  if (dry) {
    cli.info(matchedWords + ' words in (' + matched + ' of ' + count + ') revisions will be replaced!');
  } else {
    cli.ok(matchedWords + ' words in (' + matched + ' of ' + count + ') revisions replaced!');
  }
  return next();
fork icon180
star icon0
watch icon11

90
91
92
93
94
95
96
97
98
99

// transform with options

return transformer.transform(options)
    .then(function (msg) {
        cli.info(msg);
    })
    .catch(function (err) {
        error(err);
    });
fork icon0
star icon6
watch icon0

90
91
92
93
94
95
96
97
98
99
        cli.fatal(err.stack ? err.stack : err);
    }
}

function runCommand(cli, command, params, ignoreFail) {
    cli.info(util.format("running command %s %s", command, util.inspect(params)));
    var proc = child_process.spawn(command, params, {stdio: 'inherit'});
    return new Promise(function (resolve, reject) {
        proc.on('exit', function (code, signal) {
            cli.debug(command + ' process exit code ' + code + " signal " + signal);
fork icon0
star icon0
watch icon12

+ 31 other calls in file

35
36
37
38
39
40
41
42
43
44
// Functions
function chang(options) {
    options = _.extend({}, require('./defaults.js'), options);

    if (!options.release) cli.info('Missing release version');
    if (!options.github_repo) cli.info('Missing Github repository');
    cli.ok('Language chosen: ' + options.language);

    if (options.tag) {
        return getTag(options.tag).then(cb);
fork icon0
star icon0
watch icon1

+ 5 other calls in file

35
36
37
38
39
40
41
42
43
44

var film_name = details.data.title;
var time_codes = details.times;

emitter.addListener(MERGE_EVENT, function() {
  cli.info('Beginning merge process...');
  merge(film_name, output_directory, time_codes);
});

emitter.addListener(CLEANUP_EVENT, function() {
fork icon0
star icon0
watch icon2

+ 15 other calls in file

13
14
15
16
17
18
19
20
21
  cli.error('Mongoose default connection error: ' + err);
});

process.on('SIGINT', function() {  
  mongoose.connection.close(function () { 
    cli.info('Mongoose default connection disconnected through app termination'); 
    process.exit(0);
  }); 
}); 
fork icon0
star icon0
watch icon4