Comparing version 1.1.0 to 1.1.1
@@ -9,9 +9,11 @@ /* | ||
//var tty = require('tty') | ||
var tty = require('tty'); | ||
var os = require('os'); | ||
var codes = {}; | ||
exports.isatty = false; | ||
function isColorSupported() { | ||
// support for child process | ||
// if (!tty.isatty()) return false; | ||
// you can force to tty | ||
if (!exports.isatty && !tty.isatty()) return false; | ||
@@ -18,0 +20,0 @@ if ('COLORTERM' in process.env) return true; |
@@ -60,7 +60,16 @@ /* | ||
Logging.prototype.__proto__ = EventEmitter.prototype; | ||
Logging.prototype.icons = { | ||
logIcon: paint('➠ ').cyan.color, | ||
startIcon: paint('⚑ ').bold.magenta.color, | ||
endIcon: paint('➥ ').cyan.color | ||
}; | ||
if (os.type() === 'Windows_NT') { | ||
Logging.prototype.icons = { | ||
logIcon: paint('|- ').cyan.color, | ||
startIcon: paint('# ').bold.magenta.color, | ||
endIcon: paint('*- ').cyan.color | ||
}; | ||
} else { | ||
Logging.prototype.icons = { | ||
logIcon: paint('➠ ').cyan.color, | ||
startIcon: paint('⚑ ').bold.magenta.color, | ||
endIcon: paint('➥ ').cyan.color | ||
}; | ||
} | ||
Logging.prototype.colors = { | ||
@@ -67,0 +76,0 @@ debug: 'grey', |
{ | ||
"name": "colorful", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "colorful if a terminal tool for color, logging and command", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
var color = require('../lib/color'); | ||
var paint = color.paint; | ||
var should = require('should'); | ||
color.isatty = true; | ||
@@ -5,0 +6,0 @@ describe('Color', function() { |
18274
477