From 1ad9523f7048884a70eb3c1bc6db2903cf083aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Ram=C3=ADrez?= Date: Fri, 18 Jul 2014 12:16:18 -0600 Subject: [PATCH] Output offending template at minification error If a syntax error is raised while minifying and concating multiple templates, It could be hard to find the offending template. This PR output the offending template along with the error returned by htmlminifier. --- tasks/lib/compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/lib/compiler.js b/tasks/lib/compiler.js index fe1d657..90a5d1e 100644 --- a/tasks/lib/compiler.js +++ b/tasks/lib/compiler.js @@ -118,7 +118,7 @@ var Compiler = function(grunt, options, cwd) { try { source = minify(source, options.htmlmin); } catch (err) { - grunt.warn(err); + grunt.warn(err + '\n\n' + source + '\n\n'); } }