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(
17
83
3
+ 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()) {
11
52
4
+ 3 other calls in file
GitHub: Pross/img.bi
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); } });
34
0
2
GitHub: simontabor/serenity
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);
3
13
2
+ 3 other calls in file
GitHub: jokeyrhyme/cdn-sync
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') }
3
12
2
+ 13 other calls in file
GitHub: JoeBartelmo/goddard
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)
1
4
8
+ 23 other calls in file
GitHub: rutaihwa/babu
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'));
0
2
3
+ 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();
180
0
11
GitHub: deadratfink/jy-transform
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); });
0
6
0
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);
0
0
12
+ 31 other calls in file
GitHub: danilo-valente/chang
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);
0
0
1
+ 5 other calls in file
GitHub: meeech/kidcut
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() {
0
0
2
+ 15 other calls in file
GitHub: zachary95/brozer-api
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); }); });
0
0
4