fixed switch error

This commit is contained in:
Phil Kunz 2015-09-26 19:34:01 +02:00
parent c4ca5a6617
commit 4551056ba5
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/// <reference path="typings/tsd.d.ts" /> /// <reference path="./typings/tsd.d.ts" />
var colors = require("colors"); var colors = require("colors");
var through = require("through2"); var through = require("through2");
var bl; var bl;
@ -24,10 +24,16 @@ bl.log = function (logText, logType) {
switch (logType) { switch (logType) {
case 'normal': case 'normal':
logText.cyan.bold; logText.cyan.bold;
break;
case 'error': case 'error':
logText = localBl.errorPrefix + logText.red.bold; logText = localBl.errorPrefix + logText.red.bold;
break;
case 'success': case 'success':
logText = localBl.successPrefix + logText.cyan.bold; logText = localBl.successPrefix + logText.cyan.bold;
break;
default:
logText.blue.bold;
console.log(('unknown logType for "' + logText + '"').red.bold);
} }
console.log(logText); console.log(logText);
return true; return true;

View File

@ -1,4 +1,4 @@
/// <reference path="typings/tsd.d.ts" /> /// <reference path="./typings/tsd.d.ts" />
var colors = require("colors"); var colors = require("colors");
var through = require("through2"); var through = require("through2");
@ -26,10 +26,16 @@ bl.log = (logText:string = 'empty log',logType:string = 'normal') => {
switch (logType) { switch (logType) {
case 'normal': case 'normal':
logText.cyan.bold; logText.cyan.bold;
break;
case 'error': case 'error':
logText = localBl.errorPrefix + logText.red.bold; logText = localBl.errorPrefix + logText.red.bold;
break;
case 'success': case 'success':
logText = localBl.successPrefix + logText.cyan.bold; logText = localBl.successPrefix + logText.cyan.bold;
break;
default:
logText.blue.bold;
console.log(('unknown logType for "' + logText + '"').red.bold);
} }
console.log(logText); console.log(logText);
return true; return true;