How to use the ansi-colors.green 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 / update-packages.js View on Github external
colors.cyan('package.json.')
    );
    const verifyTreeCmd = yarnExecutable + ' check --verify-tree';
    exec(verifyTreeCmd);
    log('Running', colors.cyan('yarn'), 'to update packages...');
    /**
     * NOTE: executing yarn with --production=false prevents having
     * NODE_ENV=production variable set which forces yarn to not install
     * devDependencies. This usually breaks gulp for example.
     */
    execOrDie(`${yarnExecutable} install --production=false`); // Stop execution when Ctrl + C is detected.
  } else {
    log(
      colors.green('All packages in'),
      colors.cyan('node_modules'),
      colors.green('are up to date.')
    );
  }
}
github michaeldoye / mat-progress-buttons / 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 tinesoft / ngx-scrollreveal / gulpfile.js View on Github external
gulp.task('release', (cb) => {
  fancyLog('# Performing Pre-Release Checks...');
  if (!readyToRelease()) {
    fancyLog(acolors.red('# Pre-Release Checks have failed. Please fix them and try again. Aborting...'));
    cb();
  }
  else {
    fancyLog(acolors.green('# Pre-Release Checks have succeeded. Continuing...'));
    runSequence(
      'bump-version',
      'changelog',
      'commit-changes',
      'push-changes',
      'create-new-tag',
      'github-release',
      'npm-publish',
      'deploy:demo',
      (error) => {
        if (error) {
          fancyLog(acolors.red(error.message));
        } else {
          fancyLog(acolors.green('RELEASE FINISHED SUCCESSFULLY'));
        }
        cb(error);
github izelnakri / mber / lib / runners / application-files-watcher.js View on Github external
function getEventColor(event) {
  if (event === 'change') {
    return chalk.yellow('CHANGED:');
  } else if (event === 'add' || event === 'addDir') {
    return chalk.green('ADDED:');
  } else if (event === 'unlink' || event === 'unlinkDir') {
    return chalk.red('REMOVED:');
  }
}
github tinesoft / ngx-cookieconsent / 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 izelnakri / mber / lib / transpilers / transpile-npm-imports.js View on Github external
fs.readFile(entrypoint).then((buffer) => {
      const timePassed = timer.stop();
      const code = buffer.toString();

      Console.log(`${chalk.green('BUILT AMD MODULE:')} ${moduleName} in ${formatTimePassed(timePassed)} [${formatSize(code.length)}]`);

      resolve(code);
    }).catch((error) => reject(error));
  });
github compodoc / ngd / src / modules / core / src / lang / logger.ts View on Github external
private format(level, ...args) {

		let pad = (s, l, c='') => {
			return s + Array( Math.max(0, l - s.length + 1)).join( c )
		};

		let msg = args.join(' ');
		if(args.length > 1) {
			msg = `${ pad(args.shift(), 13, ' ') }: ${ args.join(' ') }`;
		}


		switch(level) {
			case LEVEL.INFO:
				msg = c.green(msg);
				break;

			case LEVEL.WARN:
				msg = c.yellow(msg);
				break;

			case LEVEL.DEBUG:
				msg = c.gray(msg);
				break;

			case LEVEL.ERROR:
			case LEVEL.FATAL:
				msg = c.red(msg);
				break;
		}
github swisspush / apikana / src / generate.js View on Github external
.on('finish', function () {
                        log.info('Done', colors.green(name), 'in', first ? (Date.now() - first) / 1000 : '?', 's');
                    })
                    .on('error', function (err) {
github ampproject / amphtml / build-system / tasks / changelog.js View on Github external
async function changelog() {
  if (!GITHUB_ACCESS_TOKEN) {
    log(
      colors.red(
        'Warning! You have not set the ' +
          'GITHUB_ACCESS_TOKEN env var. Aborting "changelog" task.'
      )
    );
    log(
      colors.green(
        'See https://help.github.com/articles/' +
          'creating-an-access-token-for-command-line-use/ ' +
          'for instructions on how to create a github access token. We only ' +
          'need `public_repo` scope.'
      )
    );
    return;
  }

  return getGitMetadata();
}
github uswds / uswds / config / gulp / doc-util.js View on Github external
logMessage(name, message) {
    log(colors.cyan(name), colors.green(message));
    notify(`${this.dirName} gulp ${name}`, message, false);
  }
};

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 3 years ago

Package Health Score

74 / 100
Full package analysis