How to use the cli-color.green function in cli-color

To help you get started, we’ve selected a few cli-color 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 uber-node / ringpop-common / tools / tick-cluster.js View on Github external
function startCluster() {
    procs = []; // note module scope
    for (var i = 0; i < procsToStart ; i++) {
        procs[i] = new ClusterProc(startingPort + i);
    }
    logMsg('init', color.cyan('started ' + procsToStart + ' procs: ') + color.green(procs.map(function (p) { return p.proc.pid; }).join(', ')));
}
github firebase / firebase-tools / scripts / test-functions-deploy.js View on Github external
.then(function() {
      console.log(clc.green("\u2713 Test passed: creating functions with filters"));
      return testDeleteWithFilter();
    })
    .then(function() {
github icyflame / cli-cube-timer / index.js View on Github external
function end_session() {
    console.log("\n\n" + clc.green("SESSION ENDED. Session stats follow:") + "\n\n");

    if (post_solving) {
      acceptSolve(last_solve, last_scramble, last_solve_timestamp);
    }

    print_stats();

    return process.exit(0);
  }
github nodesocket / express-rethinkdb-logger / server.js View on Github external
function onExit(error) {
        if(error) {
            console.error(colors.red('Uncaught exception ') + colors.redBright(error.message));
        }

        if(server) {
            server.close();
            console.info(colors.green('Server closed.'));
        }

        if(rethinkdbConnection) {
            rethinkdbConnection.close();
            console.info(colors.green('Connection to RethinkDB closed.'));
        }

        if(error) {
            process.exit(1);
        }

        process.exit(0);
    }
github la-haute-societe / air-compiler / lib / cli.js View on Github external
success: function (pSubject)
	{
		console.log(clc.green(pSubject));

		return pSubject;
	}
};
github BenBBear / Zeta / util / print.js View on Github external
var listen = function(obj) {
    console.log('[' + clc.green('listening') + '] ' + 'The server is now listening on the ' + clc.blue(obj.address + ':' + String(obj.port)) + '\n');
};
github bitpay / bwdb / scripts / analyze_txhistreports.js View on Github external
console.log('');
console.log('There were: ' + clc.red(inLTNotGTKeys.length) + ' transactions that appeared in old report but did not appear in new report.');
console.log('There were: ' + clc.blueBright(inGTNotLTKeys.length) + ' transactions that appeared in new report but did not appear in old report.');

console.log('');
console.log('Checking if any of the txs that exist in both reports have any differences...');

var diffKeys = Object.keys(amountDiff);
var logged = false;
for(var i = 0; i < diffKeys.length; i++) {
  logged = true;
  console.log('Tx: ' + diffKeys[i] + ' has a difference of: ' + amountDiff[diffKeys[i]]);
}
if (!logged) {
  console.log(clc.green('Report no differences in any tx amounts.'));
}
logged = false;

console.log('');
console.log('Checking if there are duplicate records the in new report...');
var repeatKeys = Object.keys(optsGT.repeats);
for(i = 0; i < repeatKeys.length; i++) {
  logged = true;
  var repeatNum = optsGT.repeats[repeatKeys[i]];
  if (repeatNum > 1) {
    console.log('There are: ' + clc.yellow(repeatNum) + clc.red(' repeated entries') + ' in the new report for: ' + clc.green(repeatKeys[i]) + '.');
  }
}
if (!logged) {
  console.log(clc.green('Report no dupes in reports.'));
}
github icyflame / cli-cube-timer / show-module.js View on Github external
switch (arg) {
    case 'gist':
      var pkg = require('./package.json');
      var Configstore = require('configstore');
      var conf = new Configstore(pkg.name);
      var clc = require('cli-color');

      if (conf.size < 2) {
        console.log('You have not authenticated yet.');
        console.log('Please run ' + clc.green('solve login') + ' before running ' + clc.red('solve push'));
      } else if (conf.get('gist_id') && conf.get('username')) {
        console.log('Visit this URL for your solve history: ');
        console.log('https://gist.github.com/' + conf.get('username') + '/' + conf.get('gist_id'));
      } else {
        console.log("You are authenticated, but we don't have a Gist ID.");
        console.log('Log a few solves, and then run ' + clc.green('solve push') + ' to get a Gist ID.');
      }
      break;

    case 'local':
      console.log('Local file path: ');
      console.log(require('./file-module.js').checkLocalFile());
      break;

    default:
      console.log('Unknown option!');
      console.log('For recognised options, check the README file here:');
      console.log('http://github.com/icyflame/node-cube-cli-timer');
      break;

  }
};
github dylang / observatory / lib / set-settings.js View on Github external
formatStatus: function(statusLabel, state) {

        if (!statusLabel) {
            return '';
        }

        if (state === STATE.active) {
            return cliColor.yellow(statusLabel);
        }

        if (state === STATE.done) {
            return cliColor.green(statusLabel);
        }

        if (state === STATE.done) {
            return cliColor.red(statusLabel);
        }

        return statusLabel;
    }
};
github spotify / quickstart / bin / cli.js View on Github external
var logo = 'QuickStart ' + clc.white('v' + manifest.version);

  help.group(logo);
  help.write('');

  help.write(clc.green('--self       '),
    'compile quickstart for browser compilation. defaults to', clc.red('false'));

  help.write(clc.green('--root       '),
    'use this as the root of each path. defaults to', clc.blue(pathogen.cwd()));

  help.write(clc.green('--main       '),
    'override the default entry point. defaults to', clc.red('false'));

  help.write(clc.green('--output, -o '),
    'output the compiled source to a file or STDOUT. defaults to', clc.blue('STDOUT'));

  help.write(clc.green('--source-map '),
    'output the source map to a file, STDOUT or inline. defaults to', clc.red('false'));

  help.write(clc.green('--ast        '),
    'output the Esprima generated AST to a file or STDOUT. defaults to', clc.red('false'));

  help.write(clc.green('--optimize   '),
    'feed transforms with an optimized ast. defaults to', clc.red('false'));

  help.write(clc.green('--compress   '),
    'compress the resulting AST using esmangle. defaults to', clc.red('false'));

  help.write(clc.green('--runtime    '),
    'specify a custom runtime. defaults to', clc.red('false'));