Skip to content

Commit

Permalink
feat(): add console.warn colors
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 28, 2016
1 parent b699079 commit 745a259
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,16 @@ Cli.setUpConsoleLoggingHelpers = function setUpConsoleLoggingHelpers() {
consoleInfo.call(console, msg.blue.bold);
};

var consoleWarn = console.warn;
console.warn = function() {
if (arguments.length === 1 && !arguments[0]) return;
var msg = '';
for (var n in arguments) {
msg += arguments[n] + ' ';
}
consoleWarn.call(console, msg.yellow.bold);
};

var consoleError = console.error;
console.error = function() {
if (arguments.length === 1 && !arguments[0]) return;
Expand Down

0 comments on commit 745a259

Please sign in to comment.