Skip to content

Commit 9527f8f

Browse files
committed
Replace string prototype colors with chalk
1 parent 4c040b1 commit 9527f8f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"test": "grunt test"
1717
},
1818
"dependencies": {
19+
"chalk": "^1.1.1",
1920
"hooker": "^0.2.3",
2021
"jshint": "~2.9.1"
2122
},

tasks/lib/jshint.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'use strict';
1010

1111
var path = require('path');
12+
var chalk = require('chalk');
1213
var jshintcli = require('jshint/src/cli');
1314

1415
exports.init = function(grunt) {
@@ -92,7 +93,7 @@ exports.init = function(grunt) {
9293

9394
// Only print file name once per error
9495
if (result.file !== lastfile) {
95-
grunt.log.writeln((result.file ? ' ' + result.file : '').bold);
96+
grunt.log.writeln(chalk.bold(result.file ? ' ' + result.file : ''));
9697
}
9798
lastfile = result.file;
9899

@@ -113,7 +114,7 @@ exports.init = function(grunt) {
113114
// caret will line up correctly.
114115
var evidence = e.evidence.replace(/\t/g, grunt.util.repeat(options.indent, ' '));
115116

116-
grunt.log.writeln(pad(e.line.toString(), 7) + ' |' + evidence.grey);
117+
grunt.log.writeln(pad(e.line.toString(), 7) + ' |' + chalk.gray(evidence));
117118
grunt.log.write(grunt.util.repeat(9, ' ') + grunt.util.repeat(e.character - 1, ' ') + '^ ');
118119
grunt.verbose.write('[' + e.code + '] ');
119120
grunt.log.writeln(e.reason);

0 commit comments

Comments
 (0)