How to use the ansicolors.green function in ansicolors

To help you get started, we’ve selected a few ansicolors 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 GLAMpipe / GLAMpipe / glampipe.js View on Github external
self.core.createDirIfNotExist(path.join(self.dataPath, "projects"), function(error, msg) {
					
							if(error) {
								console.log(colors.red("DATAPATH problem: " + self.dataPath));
								console.log(msg);
								cb(error);
							} else {
								global.config.dataPath = self.dataPath;
								global.config.projectsPath = path.join(self.dataPath, "projects");

								// Create the express server and routes.
								self.initializeServer();
								console.log(colors.green("INIT done"));
								cb(); 
							}
						});
					});
github liquidg3 / altair / node_modules / npm / lib / ls.js View on Github external
if (data.peerInvalid) {
    var peerInvalid = 'peer invalid'
    if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid))
    out.label += ' ' + peerInvalid
  }

  if (data.peerMissing) {
    var peerMissing = 'UNMET PEER DEPENDENCY'
    if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing))
    out.label = peerMissing + ' ' + out.label
  }

  if (data.extraneous && data.path !== dir) {
    var extraneous = 'extraneous'
    if (npm.color) extraneous = color.bgBlack(color.green(extraneous))
    out.label += ' ' + extraneous
  }

  if (data.error && depth) {
    var message = data.error.message
    if (message.indexOf('\n')) message = message.slice(0, message.indexOf('\n'))
    var error = 'error: ' + message
    if (npm.color) error = color.bgRed(color.brightWhite(error))
    out.label += ' ' + error
  }

  // add giturl to name@version
  if (data._resolved) {
    try {
      var type = npa(data._resolved).type
      var isGit = type === 'git' || type === 'hosted'
github thlorenz / cardinal / themes / hide-semicolons.js View on Github external
_default: function(s, info) {
        var nextToken = info.tokens[info.tokenIndex + 1]

        // show keys of object literals and json in different color
        return (nextToken && nextToken.type === 'Punctuator' && nextToken.value === ':')
          ? colors.green(s)
          : colors.brightGreen(s)
      }
    }
github liquidg3 / altair / node_modules / npm / lib / outdated.js View on Github external
if (!npm.config.get('global')) {
    dir = path.relative(process.cwd(), dir)
  }

  var columns = [ depname,
                  has || 'MISSING',
                  want,
                  latest,
                  deppath
                ]
  if (long) columns[5] = type

  if (npm.color) {
    columns[0] = color[has === want ? 'yellow' : 'red'](columns[0]) // dep
    columns[2] = color.green(columns[2]) // want
    columns[3] = color.magenta(columns[3]) // latest
    columns[4] = color.brightBlack(columns[4]) // dir
    if (long) columns[5] = color.brightBlack(columns[5]) // type
  }

  return columns
}
github thlorenz / replpad / lib / instructions.js View on Github external
}

var enabledPlugins = config.plugins && typeof config.plugins === 'object'
  ? allPlugins.filter(pluginIsEnabled) 
  : allPlugins;

var specs = { cpus: Object.keys(os.cpus()).length, platform: os.platform(), host: os.hostname() }
  , v = process.versions
  , plugins = enabledPlugins.map(colors.yellow).join(' | ');

var msgs = [
    ''
  , styles.underline(colors.brightRed('replpad')) + colors.yellow(' v' + pkg.version)
  , ''
  ,   format(colors.cyan('node') + ' %s', colors.yellow('v' + v.node))
    + format(' | %s | %s cpus | %s platform', colors.green(specs.host), colors.green(specs.cpus), colors.green(specs.platform))
    +  format(colors.cyan(' | v8') + ' %s | ' + colors.cyan('uv') + ' %s', colors.yellow('v' + v.v8), colors.yellow('v' + v.uv))
  , ''
  , 'plugins: ' + plugins
  , ''
  , 'If in doubt, enter ' + colors.yellow('.help')
  , '' 
  ];


module.exports = function (output) {
  //msgs.forEach(function (msg) { log.print(msg); });
  msgs.forEach(function (msg) { output.write(msg + '\n'); });
};
github graalvm / graaljs / deps / npm / lib / view.js View on Github external
Object.keys(packument['dist-tags']).forEach((t) => {
      const version = packument['dist-tags'][t]
      tags.push(`${style.bright(color.green(t))}: ${version}`)
    })
    const unpackedSize = manifest.dist.unpackedSize &&
github elastic / kibana / tasks / loadFixtures.js View on Github external
}, function bulkResponse(err, res, payload) {
        var status;
        if (err || res.statusCode !== 200) {
          grunt.fail.warn(err || payload);
          status = colors.red('error');
        } else {
          status = colors.green('success');
        }
        grunt.log.writeln(`[${status}] ${file}`);
        if (++doneProcessing === files.length) done();
      });
    });