Permalink
Browse files

Coffee task should show error messages.

  • Loading branch information...
1 parent 688414f commit 011462c4ad95bc4ad435f08d0a61e139df7855e4 @timoxley timoxley committed Jul 9, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 tasks/coffee.js
View
@@ -36,7 +36,7 @@ module.exports = function(grunt) {
var coffee = require('coffee-script'),
js = '';
- var dest = path.join(destPath,
+ var dest = path.join(destPath,
path.basename(src, '.coffee') + '.js');
options = options || {};
@@ -46,10 +46,10 @@ module.exports = function(grunt) {
try {
js = coffee.compile(grunt.file.read(src), options);
- grunt.file.write(dest, js);
} catch (e) {
- grunt.log.error("Unable to compile your coffee", e);
+ grunt.log.error(e);
}
+ if (this.errorCount) { return false; }
+ grunt.file.write(dest, js);
});
-
};

0 comments on commit 011462c

Please sign in to comment.