How to use the cli-color.magenta 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 YoloDev / babel-dts-generator / test / index.js View on Github external
return exists(dtsName).then(dtsExists => {
        if (!dtsExists) {
          console.error(clc.red('Error: ') + clc.magenta(file) + clc.red('. Dts file not found.'));
          errors += 1;
          return null;
        }

        return read(dtsName).then(actual => {
          return read(expectedFile).then(expected => {
            expected = normalize(expected);
            actual = normalize(actual);

            expected = expected.trim();
            if (!suppressAmbientDeclaration) {
              actual = actual.split('\n').slice(1, -1).map(l => l.substring(2)/* remove leading whitespace */).join('\n').trim();
            } else {
              actual = actual.replace(/export declare/g, 'export').trim();
            }
github eugeny-dementev / winston-console-formatter / test / suites / utils.js View on Github external
test('not empty stack every line break moved to right by 2 spaces', done => {
      assert.equal(
        utils.getStackTrace('Error:\n  at line', true),
        clc.magenta('\n  Error:\n    at line')
      );

      done();
    });
  });
github zanata / zanata-platform / server / zanata-frontend / src / scripts / dev-server.js View on Github external
'/v/' + c.bold('{version}') +
        '/' + c.bold('{path/and/docId}') +
        '?lang=' + c.bold('{locale}')))
    } else {
      console.log('  Valid paths: ' + c.cyan([
        `${devRoot}/explore`,
        `${devRoot}/glossary`,
        `${devRoot}/glossary/project/` + c.bold('{projectSlug}'),
        `${devRoot}/languages`,
        `${devRoot}/profile/view/` + c.bold('{username}')]
        .join('\n               ')))
    }
    console.log(`See also:      ${devRoot}/webpack-dev-server`)
    console.log('REST requests: ' + c.blue(
      `${zanataRoot}/rest (you need to run zanata server)`))
    console.log(c.magenta('Watch browser console for actions and errors.'))
    console.log(c.red('If you see errors, please fix them before you commit.'))
    console.log(c.yellow(
      'Wait for "webpack: Compiled successfully." (can take several seconds).'))
  })
}
github uber-node / ringpop-common / scripts / tick-cluster.js View on Github external
console.log(Object.keys(stats).sort().map(function (port) {
                    return color.blue('[' + port + '] ') + color.magenta(JSON.stringify(stats[port]));
                }).join('\n'));
            }
github uber-node / ringpop-node / scripts / tick-cluster.js View on Github external
console.log(Object.keys(csums).sort(function (a, b) { return csums[a].length - csums[b].length; }).map(function (csum) {
                    return color.blue('[' + csums[csum].join(', ') + '] ') + color.magenta(csum + ' (' + csums[csum].length + ')');
                }).join(' '));
            }
github uber-node / ringpop-common / scripts / tick-cluster.js View on Github external
console.log(Object.keys(csums).sort(function (a, b) { return csums[a].length - csums[b].length; }).map(function (csum) {
                    return color.blue('[' + csums[csum].join(', ') + '] ') + color.magenta(csum + ' (' + csums[csum].length + ')');
                }).join(' '));
            }
github serkanyersen / sync / server.js View on Github external
var printTitle = function(){
    write(clc.reset + '\n');
    write(printf('Started monitoring, checking every %s seconds.\n', secondsInterval));
    write('Quit the script with CONTROL-C.\n');
    write(clc.magenta('-----------------------------------------------------------\n'));
};
github kl0tl / unity-asset-store-api / bin / unity-asset-store-api.js View on Github external
var pkg = require('../package.json');

var api = require('../index');

var doc = [
  pkg.description,,

  'Usage:',,

  '  ' + clc.cyan('unity-asset-store-api') + '  [options]',,

  'Options:',,

  '  ' + clc.magenta('-h --help') + '                   Show this.',
  '  ' + clc.magenta('-o , --output ') + '  Write output to file.',
  '  ' + clc.magenta('-v --version') + '                Show version number.',,
].join('\n');

if (process.argv.length < 3) {
  writeDocToStdout();
} else {
  var argv = optimist.argv;

  if (argv.h || argv.help) {
    writeDocToStdout();
  } else if (argv.v || argv.version) {
    writeVersionToStdout();
  } else {
    api.get(argv._[0])
      .then(JSON.stringify)
      .then(function (res) {
        var output = argv.o || argv.output;
github vesln / logme / lib / themes / default.js View on Github external
/**
 * Logme - Minimalistic logging.
 * 
 * Author: Veselin Todorov 
 * Licensed under the MIT License.
 */

var color = require('cli-color');

/**
 * Exposing the theme.
 */
module.exports = {
  debug: color.magenta('- DEBUG -') + ' :message',
  info: color.cyan('- INFO -') + ' :message',
  warning: color.yellow('- WARNING -') + ' :message',
  error: color.red('- ERROR -') + ' :message',
  critical: color.red.bold('- CRITICAL -') + ' :message'
};
github felipenmoura / sos-stackoverflow-search / dist / highlighter.js View on Github external
rule.selectors.forEach(function (selector) {
                                var selStr = cliColor.blueBright(selector.replace(/\[/g, cliColor.magenta('[')).replace(/\:hover/g, cliColor.redBright(":hover")).replace(/\:active/g, cliColor.redBright(":active")).replace(/\:visited/g, cliColor.redBright(":visited")).replace(/\:link/g, cliColor.redBright(":link")).replace(/\:after/g, cliColor.redBright(":after")).replace(/\:before/g, cliColor.redBright(":before")).replace(/\./g, cliColor.magenta('.')).replace(/\#/g, cliColor.magenta('.'))
                                //.replace(/\:/g, cliColor.magenta(':'))
                                .replace(/\,/g, cliColor.magenta(',')).replace(/\(/g, cliColor.magenta('(')).replace(/\)/g, cliColor.magenta(')')).replace(/\]/g, cliColor.magenta(']')).replace(/\=/g, cliColor.magenta('=')).replace(/\"/g, cliColor.magenta('"')).replace(/\'/g, cliColor.magenta("'")));
                                sels.push(selStr);
                            });
                            cssResult += sels.join(',') + '{\n';