i18-fe-automator
Version:
前端代码提取中文并替换成$t函数
16 lines (15 loc) • 807 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const chalk_1 = __importDefault(require("chalk"));
const log = {
info: (msg) => console.log(chalk_1.default.cyan(msg)),
warning: (msg) => console.log(chalk_1.default.yellow(msg)),
success: (msg) => console.log(chalk_1.default.green(msg)),
error: (msg1, msg2 = '') => console.log(chalk_1.default.red(msg1), chalk_1.default.red(msg2)),
verbose: (label, msg = '') => process.env.CLI_VERBOSE && console.log(chalk_1.default.gray(label), msg),
debug: (label, msg = '') => process.env.CLI_DEBUG && console.log(chalk_1.default.magenta(label), msg),
};
exports.default = log;