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 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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user