Comparing version 0.3.0 to 0.3.1
var EventEmitter = require('events').EventEmitter; | ||
var colors = require('colors'); | ||
var chalk = require('chalk'); | ||
@@ -27,3 +27,3 @@ function Feedback () { | ||
if(this.color) { return msg; } | ||
return colors.stripColors(msg); | ||
return chalk.stripColor(msg); | ||
}; | ||
@@ -55,3 +55,3 @@ | ||
Feedback.prototype.success = function (msg) { | ||
this._log('Success:'.green + ' ' + this._msg(msg)); | ||
this._log(chalk.green('Success:') + ' ' + this._msg(msg)); | ||
return this; | ||
@@ -61,3 +61,3 @@ }; | ||
Feedback.prototype.warn = function (msg) { | ||
this._log('Warning:'.yellow + ' ' + this._msg(msg)); | ||
this._log(chalk.yellow('Warning:') + ' ' + this._msg(msg)); | ||
return this; | ||
@@ -67,3 +67,3 @@ }; | ||
Feedback.prototype.error = function (msg) { | ||
this._log('Error:'.red + ' ' + this._msg(msg)); | ||
this._log(chalk.red('Error:') + ' ' + this._msg(msg)); | ||
return this; | ||
@@ -70,0 +70,0 @@ }; |
{ | ||
"name": "feedback", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Fancier console.log for Node.js cli apps", | ||
@@ -27,4 +27,4 @@ "main": "lib/feedback.js", | ||
"dependencies": { | ||
"colors": "~0.6.2" | ||
"chalk": "~0.3.0" | ||
} | ||
} |
@@ -36,3 +36,3 @@ feedback | ||
feedback.test; | ||
feedback.test = true; | ||
feedback.success('Muted message'); // This message won't get printed to the bash | ||
@@ -39,0 +39,0 @@ |
var test = require('tape'); | ||
var Feedback = require('../lib/feedback').Feedback; | ||
var feedback = require('../lib/feedback'); | ||
var Feedback = feedback.Feedback; | ||
var chalk = require('chalk'); | ||
console.log('write tests, bro'); | ||
feedback.colorFix(feedback.error('write tests, bro')); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3374
56
+ Addedchalk@~0.3.0
+ Addedansi-styles@0.2.0(transitive)
+ Addedchalk@0.3.0(transitive)
+ Addedhas-color@0.1.7(transitive)
- Removedcolors@~0.6.2
- Removedcolors@0.6.2(transitive)