Skip to content

Commit

Permalink
Merge pull request #53 from rearadmiral/verbosing-logging-better
Browse files Browse the repository at this point in the history
#51 - better solution. use grunt's built-in verbose logging
  • Loading branch information
ericclemmons committed Apr 17, 2015
2 parents b4c4aa1 + 1127f8e commit 15dce84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down
4 changes: 2 additions & 2 deletions tasks/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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();
});

Expand Down

0 comments on commit 15dce84

Please sign in to comment.