diff --git a/lib/Default.coffee b/lib/Default.coffee index b1a0486..bde3c3e 100644 --- a/lib/Default.coffee +++ b/lib/Default.coffee @@ -3,6 +3,7 @@ humanizeMs = require 'ms' chalk = require 'chalk' formatUtil = require './Format' +stripAnsi = require 'strip-ansi' CONST = require './Constants' repeat = require 'repeat-string' @@ -91,7 +92,7 @@ module.exports = this colorizeMessage: (type, message) -> - return message if not @color or CONST.ENV is 'production' + return stripAnsi message if not @color or CONST.ENV is 'production' lineColor = CONST.LINE_COLOR typeColor = @types[type].color @@ -107,7 +108,7 @@ module.exports = ).join(' ') colorize: (colors, message) -> - return message if not @color or CONST.ENV is 'production' + return stripAnsi message if not @color or CONST.ENV is 'production' colors = colors.split ' ' stylize = chalk stylize = stylize[color] for color in colors diff --git a/package.json b/package.json index a5a0a62..c149116 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,11 @@ "coffee-script": "~1.10.0", "lodash.defaults": "~4.0.1", "ms": "~0.7.1", - "repeat-string": "~1.5.4" + "repeat-string": "~1.5.4", + "strip-ansi": "~3.0.1" }, "devDependencies": { - "acho-skin-cli": "~1.0.0", + "acho-skin-cli": "latest", "browserify": "latest", "coffeeify": "latest", "date-utils": "latest",