From 1127f8e6a3aae7b60f6d18a76560072a69509fc1 Mon Sep 17 00:00:00 2001 From: Bill DePhillips Date: Thu, 16 Apr 2015 20:16:46 -0700 Subject: [PATCH] #51 - better solution. use grunt's built-in verbose logging --- README.md | 4 ++++ tasks/react.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1afea9e..f964ada 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,10 @@ var MyComponent = React.createClass({displayName: 'MyComponent', }); ``` +## Troubleshooting + +If you encounter a file compilation error, you can run `grunt --verbose` to see specifics about each file being transformed. + ## Contributing In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). diff --git a/tasks/react.js b/tasks/react.js index fa9b7ff..b167ee2 100644 --- a/tasks/react.js +++ b/tasks/react.js @@ -45,7 +45,7 @@ module.exports = function(grunt) { var compiled = []; grunt.util.async.concatSeries(files, function(file, next) { - grunt.log.writeln('[react] Compiling ' + file.cyan + ' --> ' + destFile.cyan); + grunt.verbose.writeln('[react] Compiling ' + file.cyan + ' --> ' + destFile.cyan); try { compiled.push(transform(grunt.file.read(file), options)); @@ -57,7 +57,7 @@ module.exports = function(grunt) { } }, function () { grunt.file.write(destFile, compiled.join(grunt.util.normalizelf(grunt.util.linefeed))); - grunt.log.writeln('[react] File ' + destFile.cyan + ' created.'); + grunt.verbose.writeln('[react] File ' + destFile.cyan + ' created.'); nextFileObj(); });