How to use the ansi-colors.yellow 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 ampproject / amphtml / build-system / tasks / runtime-test / helpers.js View on Github external
} else {
      await reportTestFinished(totalSuccess, totalFailed);
    }
  };

  if (browsers.stable.length) {
    const allBatchesExitCodes = await runTestInBatchesWithBrowsers_(
      'stable',
      browsers.stable,
      config,
      partialTestRunCompleteFn
    );
    if (allBatchesExitCodes || errored) {
      await reportResults();
      log(
        yellow('Some tests have failed on'),
        cyan('stable'),
        yellow('browsers, so skipping running them on'),
        cyan('beta'),
        yellow('browsers.')
      );
      return allBatchesExitCodes || Number(errored);
    }
  }

  if (browsers.beta.length) {
    const allBatchesExitCodes = await runTestInBatchesWithBrowsers_(
      'beta',
      browsers.beta,
      config,
      partialTestRunCompleteFn
    );
github ampproject / amphtml / build-system / pr-check / utils.js View on Github external
function uploadOutput_(functionName, outputFileName, outputDirs) {
  const fileLogPrefix = colors.bold(colors.yellow(`${functionName}:`));

  console.log(
    `\n${fileLogPrefix} Compressing ` +
      colors.cyan(outputDirs.split(' ').join(', ')) +
      ' into ' +
      colors.cyan(outputFileName) +
      '...'
  );
  exec('echo travis_fold:start:zip_results && echo');
  execOrDie(`zip -r ${outputFileName} ${outputDirs}`);
  exec('echo travis_fold:end:zip_results');

  console.log(
    `${fileLogPrefix} Uploading ` +
      colors.cyan(outputFileName) +
      ' to ' +
github ampproject / amphtml / build-system / pr-check / yarn-checks.js View on Github external
function isYarnLockFileProperlyUpdated(fileName = 'yarn-checks.js') {
  const localChanges = gitDiffColor();
  const fileLogPrefix = colors.bold(colors.yellow(`${fileName}:`));

  if (localChanges.includes('yarn.lock')) {
    console.error(
      fileLogPrefix,
      colors.red('ERROR:'),
      'This PR did not properly update',
      colors.cyan('yarn.lock') + '.'
    );
    console.error(
      fileLogPrefix,
      colors.yellow('NOTE:'),
      'To fix this, sync your branch to',
      colors.cyan('upstream/master') + ', run',
      colors.cyan('gulp update-packages') +
        ', and push a new commit containing the changes.'
    );
    console.error(fileLogPrefix, 'Expected changes:');
    console.log(localChanges);
    return false;
  }
  return true;
}
github tinesoft / ngx-cookieconsent / gulpfile.js View on Github external
const execDemoCmd = (args,opts) => {
  if(fs.existsSync(`${config.demoDir}/node_modules`)){
    return execCmd('ng', args, opts, `/${config.demoDir}`);
  }
  else{
    fancyLog(acolors.yellow(`No 'node_modules' found in '${config.demoDir}'. Installing dependencies for you...`));
    return helpers.installDependencies({ cwd: `${config.demoDir}` })
      .then(exitCode => exitCode === 0 ? execCmd('ng', args, opts, `/${config.demoDir}`) : Promise.reject())
      .catch(e => {
        fancyLog(acolors.red(`ng command failed. See below for errors.\n`));
        fancyLog(acolors.red(e));
        process.exit(1);
      });
  }
};
github ampproject / amphtml / build-system / tasks / visual-diff / index.js View on Github external
.finally(async () => {
          log('verbose', 'Finished test', colors.yellow(name));
          page.removeListener('console', consoleLogger);
          availablePages.push(page);
        });
      pagePromises.push(pagePromise);
    }
  }

  await Promise.all(pagePromises);
  log('travis', '\n');
  if (isTravisBuild() && testErrors.length > 0) {
    testErrors.sort((a, b) => a.name.localeCompare(b.name));
    log(
      'info',
      colors.yellow('Tests warnings and errors:'),
      'expand this section'
    );
    console./*OK*/ log('travis_fold:start:visual_tests\n');
    testErrors.forEach(logTestError);
    console./*OK*/ log('travis_fold:end:visual_tests');
    return false;
  }
  return true;
}
github angular-material-extensions / calendar / gulpfile.js View on Github external
const isOK = condition => {
  if (condition === undefined) {
    return acolors.yellow('[SKIPPED]');
  }
  return condition ? acolors.green('[OK]') : acolors.red('[KO]');
};
github liferay / liferay-js-themes-toolkit / packages / liferay-theme-tasks / tasks / kickstart.js View on Github external
gulp.task('kickstart', (cb) => {
		log(
			colors.yellow('Warning:'),
			'the',
			colors.cyan('kickstart'),
			'task will potentially overwrite files in your src directory'
		);

		KickstartPrompt.prompt(
			{
				themeConfig: lfrThemeConfig.getConfig(),
			},
			(answers) => {
				let tempNodeModulesPath;
				let themeSrcPath;

				if (answers.modulePath) {
					themeSrcPath = answers.modulePath;
				} else if (answers.module) {
github ampproject / amphtml / build-system / common / utils.js View on Github external
function usesFilesOrLocalChanges(taskName) {
  const validUsage = argv.files || argv.local_changes;
  if (!validUsage) {
    log(
      yellow('NOTE 1:'),
      'It is infeasible for',
      cyan(`gulp ${taskName}`),
      'to check all files in the repo at once.'
    );
    log(
      yellow('NOTE 2:'),
      'Please run',
      cyan(`gulp ${taskName}`),
      'with',
      cyan('--files'),
      'or',
      cyan('--local_changes') + '.'
    );
  }
  return validUsage;
}
github ampproject / amphtml / build-system / tasks / lint.js View on Github external
eslint.results(function(results) {
        if (results.errorCount == 0 && results.warningCount == 0) {
          if (!isTravisBuild()) {
            logOnSameLine(
              colors.green('SUCCESS: ') + 'No linter warnings or errors.'
            );
          }
        } else {
          const prefix =
            results.errorCount == 0
              ? colors.yellow('WARNING: ')
              : colors.red('ERROR: ');
          logOnSameLine(
            prefix +
              'Found ' +
              results.errorCount +
              ' error(s) and ' +
              results.warningCount +
              ' warning(s).'
          );
          if (!options.fix) {
            log(
              colors.yellow('NOTE 1:'),
              'You may be able to automatically fix some of these warnings ' +
                '/ errors by running',
              colors.cyan('gulp lint --local_changes --fix'),
              'from your local branch.'
github enquirer / enquirer / examples / fun / countdown.js View on Github external
const color = t => t >= 7 ? green(t) : t > 3 ? yellow(t) : red(t);
let time = 5;

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