From b24a7d9c2d098a951e57dd9d1dcdaf06b2bb1398 Mon Sep 17 00:00:00 2001 From: dutscher Date: Fri, 29 Jul 2016 12:16:55 +0200 Subject: [PATCH 1/3] make the log output colorful via new option "logColor" and its color values http://slides.com/joshschumacher/grunt-logging#/5 --- tasks/sass-lint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/sass-lint.js b/tasks/sass-lint.js index 1bd20fe..11afdbb 100755 --- a/tasks/sass-lint.js +++ b/tasks/sass-lint.js @@ -24,7 +24,7 @@ module.exports = function (grunt) { opts['output-file'] = opts['outputFile']; lint.outputResults(results, { options: opts }); } else { - grunt.log.writeln(resultFormat); + grunt.log.writeln(('logColor' in opts ? resultFormat[opts.logColor] : resultFormat)); } if (errorCount.count > 0) grunt.fail.warn(''); } From 03436ed28f11ae9851855b34c4a76597ad9adfef Mon Sep 17 00:00:00 2001 From: dutscher Date: Fri, 29 Jul 2016 12:20:39 +0200 Subject: [PATCH 2/3] spin the condition more guys use this without logColor --- tasks/sass-lint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/sass-lint.js b/tasks/sass-lint.js index 11afdbb..439cb7d 100755 --- a/tasks/sass-lint.js +++ b/tasks/sass-lint.js @@ -24,7 +24,7 @@ module.exports = function (grunt) { opts['output-file'] = opts['outputFile']; lint.outputResults(results, { options: opts }); } else { - grunt.log.writeln(('logColor' in opts ? resultFormat[opts.logColor] : resultFormat)); + grunt.log.writeln(!('logColor' in opts) ? resultFormat : resultFormat[opts.logColor]); } if (errorCount.count > 0) grunt.fail.warn(''); } From 3cefb3be9cd14858fad7dcd3a4fc5a4941e3e459 Mon Sep 17 00:00:00 2001 From: dutscher Date: Fri, 29 Jul 2016 12:23:40 +0200 Subject: [PATCH 3/3] Added new logColor parameter --- readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/readme.md b/readme.md index d7bc0ba..98b8eca 100755 --- a/readme.md +++ b/readme.md @@ -20,6 +20,7 @@ grunt.initConfig({ sasslint: { options: { configFile: 'config/.sass-lint.yml', + logColor: 'yellow' }, target: ['location/\*.scss', 'other_location/\*.scss'] } @@ -63,3 +64,10 @@ Type: `string` Default: `` Will save the generated output to disk instead of command line. + +### logColor + +Type: `string` +Default: `` + +Will change your console output to a colorful hint. See http://slides.com/joshschumacher/grunt-logging#/5 for all the possible colors