UNPKG

rs-runner

Version:

RS is a CLI tool for quickly detecting package.json scripts, and running them.

28 lines (22 loc) 554 B
import chalk from 'chalk'; import { Color } from 'chalk'; export const output = (value: string, color?: typeof Color) => { if (color && chalk[color]) { console.log(chalk[color](value)); } else { console.log(value); } }; output.error = (value: string) => { console.error(chalk.red(value)); }; output.warn = (value: string) => { console.warn(chalk.yellow(value)); }; export const runnerColors = { npm: chalk.redBright, yarn: chalk.cyanBright, pnpm: chalk.yellowBright, bun: chalk.magentaBright, deno: chalk.greenBright, };