UNPKG

wangyj

Version:

wangyj 个人常用命令库

22 lines (21 loc) 849 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatOutput = void 0; const chalk_1 = __importDefault(require("chalk")); const formatOutput = (title, out, type) => { switch (type) { case "success": console.log(chalk_1.default.bgGreen.white(` ${title} `), chalk_1.default.green(` ${out} `)); break; case "error": console.log(chalk_1.default.bgRed.white(` ${title} `), chalk_1.default.red(` ${out} `)); break; case "warning": console.log(chalk_1.default.bgYellow.white(` ${title} `), chalk_1.default.yellow(` ${out} `)); break; } }; exports.formatOutput = formatOutput;