(str, type)
| 29 | |
| 30 | |
| 31 | addColor(str, type) { |
| 32 | if (supportsColor() && (typeof argv.color === 'undefined' || argv.color)) { |
| 33 | if (type === 'warn') { |
| 34 | return this.colors.yellow(str); |
| 35 | } else if (type === 'error') { |
| 36 | return this.colors.red(str); |
| 37 | } else if (type === 'info') { |
| 38 | return this.colors.gray(str); |
| 39 | } |
| 40 | return this.colors.green(str); |
| 41 | } |
| 42 | return str; |
| 43 | } |
| 44 | |
| 45 | log(tag, content) { |
| 46 | if (arguments.length > 1) { |