How to use the colorette.magenta function in colorette

To help you get started, we’ve selected a few colorette 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 knex / knex / bin / cli.js View on Github external
function initKnex(env, opts) {
  checkLocalModule(env);
  if (process.cwd() !== env.cwd) {
    process.chdir(env.cwd);
    console.log(
      'Working directory changed to',
      color.magenta(tildify(env.cwd))
    );
  }

  if (!opts.knexfile) {
    const configurationPath = resolveKnexFilePath();
    const configuration = configurationPath
      ? require(configurationPath.path)
      : undefined;

    env.configuration = configuration || mkConfigObj(opts);
    if (!env.configuration.ext && configurationPath) {
      env.configuration.ext = configurationPath.extension;
    }
  }
  // If knexfile is specified
  else {
github mattallty / Caporal.js / lib / help.js View on Github external
_getCommands() {
    const commandTable = this._getSimpleTable();
    this._program._commands
      // don't include default command
      .filter((c) => c.name() !== '' && c.visible())
      .forEach(cmd => {
        commandTable.push(
          [c.magenta(cmd.getSynopsis()), cmd.description()]
        );
      });
    commandTable.push([c.magenta('help '), 'Display help for a specific command']);
    return c.bold('COMMANDS') + "\n\n" + colorize(commandTable.toString());
  }
github knex / knex / bin / utils / cli-config-utils.js View on Github external
function resolveEnvironmentConfig(opts, allConfigs) {
  const environment = opts.env || process.env.NODE_ENV || 'development';
  const result = allConfigs[environment] || allConfigs;

  if (allConfigs[environment]) {
    console.log('Using environment:', color.magenta(environment));
  }

  if (!result) {
    console.log(color.red('Warning: unable to read knexfile config'));
    process.exit(1);
  }

  if (argv.debug !== undefined) {
    result.debug = argv.debug;
  }

  return result;
}
github knex / knex / bin / utils / cli-config-utils.js View on Github external
function checkLocalModule(env) {
  if (!env.modulePath) {
    console.log(
      color.red('No local knex install found in:'),
      color.magenta(tildify(env.cwd))
    );
    exit('Try running: npm install knex');
  }
}
github knex / knex / bin / cli.js View on Github external
cli.on('require', function(name) {
  console.log('Requiring external module', color.magenta(name));
});
github mattallty / Caporal.js / lib / colorful.js View on Github external
}).replace(//gi, (match) => {
    return c.magenta(match);
  }).replace(/\[([^[\]]+)\]/gi, (match) => {
    return c.yellow(match);