fixed switch error
This commit is contained in:
parent
c4ca5a6617
commit
4551056ba5
8
index.js
8
index.js
@ -1,4 +1,4 @@
|
||||
/// <reference path="typings/tsd.d.ts" />
|
||||
/// <reference path="./typings/tsd.d.ts" />
|
||||
var colors = require("colors");
|
||||
var through = require("through2");
|
||||
var bl;
|
||||
@ -24,10 +24,16 @@ bl.log = function (logText, logType) {
|
||||
switch (logType) {
|
||||
case 'normal':
|
||||
logText.cyan.bold;
|
||||
break;
|
||||
case 'error':
|
||||
logText = localBl.errorPrefix + logText.red.bold;
|
||||
break;
|
||||
case 'success':
|
||||
logText = localBl.successPrefix + logText.cyan.bold;
|
||||
break;
|
||||
default:
|
||||
logText.blue.bold;
|
||||
console.log(('unknown logType for "' + logText + '"').red.bold);
|
||||
}
|
||||
console.log(logText);
|
||||
return true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference path="typings/tsd.d.ts" />
|
||||
/// <reference path="./typings/tsd.d.ts" />
|
||||
var colors = require("colors");
|
||||
var through = require("through2");
|
||||
|
||||
@ -26,10 +26,16 @@ bl.log = (logText:string = 'empty log',logType:string = 'normal') => {
|
||||
switch (logType) {
|
||||
case 'normal':
|
||||
logText.cyan.bold;
|
||||
break;
|
||||
case 'error':
|
||||
logText = localBl.errorPrefix + logText.red.bold;
|
||||
break;
|
||||
case 'success':
|
||||
logText = localBl.successPrefix + logText.cyan.bold;
|
||||
break;
|
||||
default:
|
||||
logText.blue.bold;
|
||||
console.log(('unknown logType for "' + logText + '"').red.bold);
|
||||
}
|
||||
console.log(logText);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user