How to use the ansi-colors.blue function in ansi-colors

To help you get started, we’ve selected a few ansi-colors 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 mochajs / mocha / lib / cli / cli.js View on Github external
})
    .fail((msg, err, yargs) => {
      debug(err);
      yargs.showHelp();
      console.error(`\n${symbols.error} ${ansi.red('ERROR:')} ${msg}`);
      process.exit(1);
    })
    .help('help', 'Show usage information & exit')
    .alias('help', 'h')
    .version('version', 'Show version number & exit', version)
    .alias('version', 'V')
    .wrap(process.stdout.columns ? Math.min(process.stdout.columns, 80) : 80)
    .epilog(
      `Mocha Resources
    Chat: ${ansi.magenta(gitter)}
  GitHub: ${ansi.blue(repository.url)}
    Docs: ${ansi.yellow(homepage)}
      `
    )
    .parserConfiguration(YARGS_PARSER_CONFIG)
    .config(args)
    .parse(args._);
};
github izelnakri / mber / lib / utils / fastboot-express-middleware.js View on Github external
function log(statusCode, message, startTime) {
  let color = statusCode === 200 ? 'green' : 'red';
  let now = new Date();

  if (startTime) {
    let diff = Date.now() - startTime;
    message = message + chalk.blue(" " + diff + "ms");
  }

  console.log(chalk.blue(now.toISOString()) + " " + chalk[color](statusCode) + " " + message);
}
github izelnakri / mber / lib / utils / fastboot-express-middleware.js View on Github external
function log(statusCode, message, startTime) {
  let color = statusCode === 200 ? 'green' : 'red';
  let now = new Date();

  if (startTime) {
    let diff = Date.now() - startTime;
    message = message + chalk.blue(" " + diff + "ms");
  }

  console.log(chalk.blue(now.toISOString()) + " " + chalk[color](statusCode) + " " + message);
}
github microsoft / vscode / build / azure-pipelines / mixin.js View on Github external
function main() {
	const quality = process.env['VSCODE_QUALITY'];

	if (!quality) {
		console.log('Missing VSCODE_QUALITY, skipping mixin');
		return;
	}

	const productJsonFilter = filter('product.json', { restore: true });

	fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
	return vfs
		.src(`quality/${quality}/**`, { base: `quality/${quality}` })
		.pipe(filter(f => !f.isDirectory()))
		.pipe(productJsonFilter)
		.pipe(buffer())
		.pipe(json(o => Object.assign({}, require('../product.json'), o)))
		.pipe(productJsonFilter.restore)
		.pipe(es.mapSync(function (f) {
			fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
			return f;
		}))
		.pipe(vfs.dest('.'));
}
github ampproject / amphtml / build-system / tasks / presubmit-checks.js View on Github external
.on('end', function() {
        if (forbiddenFound) {
          log(colors.blue(
              'Please remove these usages or consult with the AMP team.'));
        }
        if (missingRequirements) {
          log(colors.blue(
              'Adding these terms (e.g. by adding a required LICENSE ' +
            'to the file)'));
        }
        if (forbiddenFound || missingRequirements) {
          process.exit(1);
        }
      });
}
github janpaepke / ScrollMagic / dev / build / filesize.js View on Github external
cb(null, file);
			return;
		}

		if (file.isStream()) {
			logger.error('Streaming not supported');
			return;
		}

		var size = file.contents.length;
		var gzipsize = gzipSize.sync(file.contents)
		totalSize += size;
		totalSizeGzip += gzipsize;

		if (options.showFiles === true && size > 0) {
			log(options.title, colors.blue(file.relative), size, gzipsize);
		}

		fileCount++;
		cb(null, file);
			
	}, function (cb) {
		if (fileCount === 1 && options.showFiles === true && totalSize > 0) {
github 1000ch / gulp-image / index.js View on Github external
}, (file, enc, callback) => {
  if (file.isNull()) {
    return callback(null, file);
  }

  if (file.isStream()) {
    return callback(new Error('gulp-image: Streaming is not supported'));
  }

  const log = options && options.quiet ? NOOP : fancyLog;
  const extension = extname(file.path).toLowerCase();

  if (!SUPPORTED_EXTENSIONS.includes(extension)) {
    log('gulp-image: Skipping unsupported image ' + colors.blue(file.relative));
    return callback(null, file);
  }

  optimize(file.contents, Object.assign({
    pngquant       : true,
    optipng        : false,
    zopflipng      : true,
    jpegRecompress : false,
    mozjpeg        : true,
    guetzli        : false,
    gifsicle       : true,
    svgo           : true
  }, options)).then(buffer => {
    const before = file.contents.length;
    const after = buffer.length;
    const diff = before - after;
github swisspush / apikana / src / plopfile_init.js View on Github external
actions.push((answers) => {
                log('\nCreation finished. Have a look at it:');
                log(pad('Go to your project:'), colors.green('cd ' + answers.projectName));
                log(pad('Install dependencies:'), colors.green('npm install'));
                log(pad('Create the documentation:'), colors.green('npm start'));
                log(pad('Open a browser at'), colors.blue('http://localhost:8333'));
            });
github ampproject / amphtml / build-system / tasks / process-3p-github-pr.js View on Github external
function assignIssue(issue, assignees) {
  const {number} = issue;
  const options = extend(
    {
      url:
        'https://api.github.com/repos/ampproject/amphtml/issues/' +
        `${number}/assignees`,
      method: 'POST',
      body: JSON.stringify({
        'assignees': assignees,
      }),
    },
    defaultOption
  );
  if (isDryrun) {
    log(colors.blue(`assign PR #${number}, to ${assignees}`));
    return Promise.resolve();
  }
  return request(options);
}
github ampproject / amphtml / build-system / tasks / presubmit-checks.js View on Github external
.on('end', function() {
      if (forbiddenFound) {
        log(
          colors.blue(
            'Please remove these usages or consult with the AMP team.'
          )
        );
      }
      if (missingRequirements) {
        log(
          colors.blue(
            'Adding these terms (e.g. by adding a required LICENSE ' +
              'to the file)'
          )
        );
      }
      if (forbiddenFound || missingRequirements) {
        process.exitCode = 1;
      }
    });
}

ansi-colors

Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).

MIT
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis