From 8d7e7c30d4f3d3590533e09398d68bfb95b56f4a Mon Sep 17 00:00:00 2001 From: Stephen Brandwood Date: Fri, 21 Mar 2014 13:54:45 +0000 Subject: [PATCH] Throw a proper error when something goes wrong. Throw a proper error to make Grunt stop running. --- tasks/react.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tasks/react.js b/tasks/react.js index bb96895..2f1c8ff 100644 --- a/tasks/react.js +++ b/tasks/react.js @@ -52,9 +52,7 @@ module.exports = function(grunt) { compiled.push(transform(grunt.file.read(file))); next(); } catch (e) { - var error = grunt.log.wordlist(['[react] ' + e], { color: 'red' }); - grunt.log.error(error); - nextFileObj(error); + grunt.fail.warn(e); } }, function () { grunt.file.write(destFile, compiled.join(grunt.util.normalizelf(grunt.util.linefeed)));