UNPKG

simba-cli

Version:

A simple CLI to handle most basic and everyday usage cli command wishes

37 lines 1.11 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Log = void 0; const chalk_1 = __importDefault(require("chalk")); const boxen_1 = __importDefault(require("boxen")); class Log { static print(msg, bg, brd) { const greeting = chalk_1.default.white.bold(msg); const boxenOptions = { padding: 1, margin: 1, borderStyle: 'classic', float: 'center', borderColor: brd, backgroundColor: bg, }; const msgBox = (0, boxen_1.default)(greeting, boxenOptions); console.log(msgBox); } static error(msg) { Log.print(msg, 'redBright', 'red'); } static info(msg) { Log.print(msg, 'magenta', 'magentaBright'); } static success(msg) { Log.print(msg, 'green', 'greenBright'); } static log(...msg) { console.log(...msg); } } exports.Log = Log; //# sourceMappingURL=log.js.map