Skip to content

Commit 745a259

Browse files
committed
feat(): add console.warn colors
1 parent b699079 commit 745a259

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/cli.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,16 @@ Cli.setUpConsoleLoggingHelpers = function setUpConsoleLoggingHelpers() {
288288
consoleInfo.call(console, msg.blue.bold);
289289
};
290290

291+
var consoleWarn = console.warn;
292+
console.warn = function() {
293+
if (arguments.length === 1 && !arguments[0]) return;
294+
var msg = '';
295+
for (var n in arguments) {
296+
msg += arguments[n] + ' ';
297+
}
298+
consoleWarn.call(console, msg.yellow.bold);
299+
};
300+
291301
var consoleError = console.error;
292302
console.error = function() {
293303
if (arguments.length === 1 && !arguments[0]) return;

0 commit comments

Comments
 (0)