From e5681097f4766daeeafc7e04300605f7bb9caec5 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 2 Oct 2014 17:02:14 -0400 Subject: [PATCH] added error to minification step --- src/meta/js.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/meta/js.js b/src/meta/js.js index 6b596988c9..165e7f2b23 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -133,11 +133,16 @@ module.exports = function(Meta) { mapStream = minifier.stdio[2], mapString = '', step = 0, - onComplete = function() { + onComplete = function(err) { if (step === 0) { return step++; } + if (err) { + winston.error('[meta/js] Minification failed: ' + err.message); + process.exit(0); + } + Meta.js.cache = minifiedString; Meta.js.map = mapString; winston.info('[meta/js] Compilation complete');