UNPKG

commit-and-tag-version

Version:

replacement for `npm version` with automatic CHANGELOG generation

24 lines (22 loc) 540 B
const chalk = require('chalk'); const figures = require('figures'); const util = require('util'); module.exports = function (argv, msg, args, figure) { const defaultFigure = argv.dryRun ? chalk.yellow(figures.tick) : chalk.green(figures.tick); if (!argv.silent) { console.info( (figure || defaultFigure) + ' ' + util.format.apply( util, [msg].concat( args.map(function (arg) { return chalk.bold(arg); }), ), ), ); } };