UNPKG

@speedy-js/mono

Version:

Monorepo development & continuous integration tooling.

37 lines 1.09 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; /** * Module dependencies */ const chalk_1 = __importDefault(require("chalk")); const { name: ID } = require('../../../package.json'); const debug = require('debug')(ID); function error(msg) { return console.log(`${chalk_1.default.cyan('❯ ')}${chalk_1.default.gray(ID)} ${chalk_1.default.red('error')} ${msg}`); } function info(msg) { return console.log(`${chalk_1.default.cyan('❯ ')}${chalk_1.default.gray(ID)} 💬 ${msg}`); } function warn(msg) { return console.log(`${chalk_1.default.cyan('❯ ')}${chalk_1.default.gray(ID)} ⚠️ ${msg}`); } function enableDebug() { require('debug').enable(ID); } function disableDebug() { require('debug').disable(ID); } const logger = { info, warn, error, debug, enableDebug, disableDebug, }; exports.logger = logger; //# sourceMappingURL=logger.js.map