zents-cli
Version:
ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.
33 lines (32 loc) • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.debug = exports.error = exports.success = exports.info = void 0;
const tslib_1 = require("tslib");
const chalk_1 = require("chalk");
const figures_1 = tslib_1.__importDefault(require("figures"));
const ICON = {
INFO: figures_1.default('ℹ'),
SUCCESS: figures_1.default('✔'),
ERROR: figures_1.default('✖'),
DEBUG: figures_1.default('›'),
};
function info(msg = '') {
const prefix = msg.length ? '[ZenTS-CLI] ' : '';
return `${chalk_1.black.bgCyan(`${prefix}${ICON.INFO}INFO${ICON.INFO}`)} ${chalk_1.cyan(msg)}`;
}
exports.info = info;
function success(msg = '') {
const prefix = msg.length ? '[ZenTS-CLI] ' : '';
return `${chalk_1.white.bgGreen(`${prefix}${ICON.SUCCESS}SUCCESS${ICON.SUCCESS}`)} ${chalk_1.green(msg)}`;
}
exports.success = success;
function error(msg = '') {
const prefix = msg.length ? '[ZenTS-CLI] ' : '';
return `${chalk_1.white.bgRed(`${prefix}${ICON.ERROR}ERROR${ICON.ERROR}`)} ${chalk_1.red(msg)}`;
}
exports.error = error;
function debug(msg = '') {
const prefix = msg.length ? '[ZenTS-CLI] ' : '';
return `${chalk_1.white.bgMagenta(`${prefix}${ICON.DEBUG}DEBUG${ICON.DEBUG}`)} ${chalk_1.magenta(msg)}`;
}
exports.debug = debug;