Comparing version 1.2.3 to 1.2.4
@@ -28,4 +28,10 @@ 'use strict' | ||
this.opts = {} | ||
this.opts['stdout'] = opts['stdout'] || process.stdout | ||
this.opts['stderr'] = opts['stderr'] || process.stderr | ||
this.opts['debug'] = opts['debug'] || false | ||
this.opts['color'] = opts['color'] == null ? true : opts['color'] | ||
// Disable colored output if piped. | ||
if (this.opts['stdout'].isTTY || this.opts['stderr'].isTTY) { | ||
this.opts['color'] = false | ||
} | ||
} | ||
@@ -99,3 +105,3 @@ | ||
info(...strs) { | ||
return super.info(this.blue('INFO:'), ...strs) | ||
return super.info(`${this.blue('INFO')}:`, ...strs) | ||
} | ||
@@ -110,5 +116,5 @@ | ||
if (isFunction(super.debug)) { | ||
return super.debug(this.green('DEBUG:'), ...strs) | ||
return super.debug(`${this.green('DEBUG')}:`, ...strs) | ||
} | ||
return super.log(this.green('DEBUG:'), ...strs) | ||
return super.log(`${this.green('DEBUG')}:`, ...strs) | ||
} | ||
@@ -121,3 +127,3 @@ } | ||
warn(...strs) { | ||
return super.warn(this.yellow('WARN:'), ...strs) | ||
return super.warn(`${this.yellow('WARN')}:`, ...strs) | ||
} | ||
@@ -129,3 +135,3 @@ | ||
error(...strs) { | ||
return super.error(this.red('ERROR:'), ...strs) | ||
return super.error(`${this.red('ERROR')}:`, ...strs) | ||
} | ||
@@ -132,0 +138,0 @@ } |
{ | ||
"name": "hikarujs", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "A static site generator that generates routes based on directories naturally.", | ||
@@ -5,0 +5,0 @@ "main": "hikaru/index.js", |
90091
2640