UNPKG

better-scripts

Version:

The next level of npm scripts. An npm scripts runner. A better way to organize your npm scripts. Make redundant NPM scripts easier to read, maintain and use.

9 lines (7 loc) 250 B
import chalk from 'chalk'; export function errorHandler(err) { console.error(chalk.bgRed.bold(err.name)); console.error(chalk.red(err.message)); if (process.env.TRACK_ERROR === 'true') console.error(chalk.red(err.stack)); process.exit(1); }