How to use the figures.tick function in figures

To help you get started, we’ve selected a few figures 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 migg24 / git-keeper / lib / actions / checkMaster.js View on Github external
console.log(
                chalk.red(figures.cross +' Continuing with branch "' + match[0] + '" (--force)')
            )
        } else {
            // No --force and not on master? -> error message
            if (match[0] !== 'master') {
                throw new Error(
                    chalk.red(figures.warning) +
                    chalk.red.bold(
                        ' You are currently not on branch "master" but on "' + match[0] + '". This is not recommended!')
                    + '\n  Use --force to continue anyway.'
                )
            }

            console.log(
                chalk.green(figures.tick) +
                chalk.dim(' You are on branch "master"')
            )
        }

        // return current branch name and remote name
        return {
            current: match[0],
            remote: match[1] ? match[1].trim().replace(/\0/g, '') : ''
        }
    })
}
github dominique-mueller / simple-progress-webpack-plugin / logger / compact-logger.js View on Github external
}

		// STEP 4: EMIT
		if ( progress >= 0.95 && progress < 1 ) {

			// Skip if we jumped back a step, else update the step counter
			if ( previousStep > 4 ) {
				return;
			}
			previousStep = 4;

			logLines.push( chalk.white( `  ${ figures.pointer } Emit files` ) );

		} else if ( progress === 1 ) {

			logLines.push( chalk.green( `  ${ figures.tick } Emit files` ) );

		}

		// STEP 5: FOOTER
		if ( progress === 1 ) {

			// Calculate process time
			previousStep = 0;
			const finishTime = new Date().getTime();
			const processTime = ( ( finishTime - startTime ) / 1000 ).toFixed( 3 );

			logLines.push( chalk.white( `\nWebpack: Finished after ${ processTime } seconds.\n` ) );

		}

		// Finally, let's bring those logs to da screen
github sebastian-software / preppy / src / progressPlugin.js View on Github external
async generateBundle(outputOptions, bundle, isWrite) {
        for (const fileName in bundle) {
          const entry = bundle[fileName]
          console.log(
            `${chalk.green(figures.tick)} Written: ${chalk.green(
              path.relative(root, outputOptions.file)
            )} in ${chalk.blue(formatDuration(start))} [${prettyBytes(entry.code.length)}]`
          )
        }
      }
    }
github holistics / dbml / packages / dbml-cli / src / cli / export.js View on Github external
const format = getFormatOpt(opts);

    if (!opts.outFile && !opts.outDir) {
      generate(inputPaths, (dbml) => exporter.export(dbml, format), OutputConsolePlugin);
    } else if (opts.outFile) {
      const header = [
        '-- SQL dump generated using DBML (dbml-lang.org)\n',
        `-- Database: ${config[format].name}\n`,
        `-- Generated at: ${new Date().toISOString()}\n\n`,
      ].join('');

      generate(inputPaths, (dbml) => exporter.export(dbml, format),
        new OutputFilePlugin(resolvePaths(opts.outFile), header));

      console.log(`  ${chalk.green(figures.tick)} Generated SQL dump file (${config[format].name}): ${path.basename(opts.outFile)}`);
    }
  } catch (err) {
    logger.error(err);
  }
}
github naholyr / show-time / clear-cache.js View on Github external
let total = files.reduce((sum, f, i) => {
        try {
          if (dryRun) {
            accessSync(f.name, W_OK)
          } else {
            rimraf.sync(f.name)
          }
          console.log(chalk.green(`${figures.tick} ${pad(stats[i].hsize)} ${f.name}`))
          return sum + stats[i].size
        } catch (e) {
          console.error(chalk.red(`${figures.cross} ${f.name}`))
          console.error(chalk.red(`  ${e.message}`))
          return sum
        }
      }, 0)
      console.log(chalk.bold(`Total: ${filesize(total)}`))
github dominique-mueller / automatic-release / src / tasks / generate-changelog-file.js View on Github external
changelogFileStream.on( 'finish', () => {
			console.log( chalk.green( `    ${ figures.tick } Generated changelog, then placed it within the "CHANGELOG.md" file.` ) );
			resolve();
		} );
github benhartley / mutant / src / plugins / reporters / default.js View on Github external
function getMutationRepresentation(state) {
    if (state === '0') {return chalk.green(`${figures.tick}`);}
    return chalk.red(`${figures.cross}`);
}
github x-orpheus / elint / src / utils / log.js View on Github external
function getColorFnAndIconByType (type) {
  let colorFn, icon

  switch (type) {
    case 'error':
      colorFn = chalk.red
      icon = figures.cross
      break
    case 'warn':
      colorFn = chalk.yellow
      icon = figures.warning
      break
    case 'success':
      colorFn = chalk.green
      icon = figures.tick
      break
    default:
      colorFn = chalk.blue
      icon = figures.info
      break
  }

  return { colorFn, icon }
}
github vadimdemedes / trevor / lib / get-output.js View on Github external
icon = chalk.grey(figures.circleDotted);
		}

		if (currentState === STATE_CLEANING) {
			message = chalk.grey('cleaning up');
			icon = chalk.grey(figures.circleDotted);
		}

		if (currentState === STATE_RUNNING) {
			message = chalk.grey('running');
			icon = chalk.grey(figures.circleDotted);
		}

		if (currentState === STATE_SUCCESS) {
			message = chalk.green('success');
			icon = chalk.green(figures.tick);
		}

		if (currentState === STATE_ERROR) {
			message = chalk.red('error');
			icon = chalk.red(figures.cross);
		}

		items.push([icon, ` ${version}: `, message]);
	}

	return '\n' + indentString(table(items, {hsep: ''}), 1);
};
github klaussinani / signale / src / types.js View on Github external
logLevel: 'info'
  },
  info: {
    badge: figures.info,
    color: 'blue',
    label: 'info',
    logLevel: 'info'
  },
  star: {
    badge: figures.star,
    color: 'yellow',
    label: 'star',
    logLevel: 'info'
  },
  success: {
    badge: figures.tick,
    color: 'green',
    label: 'success',
    logLevel: 'info'
  },
  wait: {
    badge: figures.ellipsis,
    color: 'blue',
    label: 'waiting',
    logLevel: 'info'
  },
  warn: {
    badge: figures.warning,
    color: 'yellow',
    label: 'warning',
    logLevel: 'warn'
  },