1 | "use strict";
|
2 | var rawConsole = require("console");
|
3 | var chalk = require("chalk");
|
4 | exports.DEBUG = !!process.env.DEBUG;
|
5 | exports.log = function (text, color) {
|
6 | if (color === void 0) { color = 'white'; }
|
7 | rawConsole.info(chalk[color](text));
|
8 | };
|
9 | exports.logDebug = function (text, color) {
|
10 | if (color === void 0) { color = 'white'; }
|
11 | if (!exports.DEBUG) {
|
12 | return;
|
13 | }
|
14 | rawConsole.info(chalk[color](text));
|
15 | };
|
16 | exports.bgLog = function (text, color) {
|
17 | if (color === void 0) { color = 'white'; }
|
18 | rawConsole.info(chalk[color].inverse(text));
|
19 | };
|
20 |
|
\ | No newline at end of file |