From 2b85a52a054ac8cf1ab86ce1cd3de7819d30ea52 Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Fri, 13 Dec 2013 12:23:18 -0800 Subject: [PATCH] feat(app): use htmlmin for smaller HTML files Use htmlmin options to minify the HTML correctly. Only 'safe' options are used Fixes #469 --- templates/common/Gruntfile.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/templates/common/Gruntfile.js b/templates/common/Gruntfile.js index 66342217b..a0c95567d 100644 --- a/templates/common/Gruntfile.js +++ b/templates/common/Gruntfile.js @@ -273,14 +273,10 @@ module.exports = function (grunt) { htmlmin: { dist: { options: { - // Optional configurations that you can uncomment to use - // removeCommentsFromCDATA: true, - // collapseBooleanAttributes: true, - // removeAttributeQuotes: true, - // removeRedundantAttributes: true, - // useShortDoctype: true, - // removeEmptyAttributes: true, - // removeOptionalTags: true*/ + collapseWhitespace: true, + collapseBooleanAttributes: true, + removeCommentsFromCDATA: true, + removeOptionalTags: true }, files: [{ expand: true, @@ -358,8 +354,7 @@ module.exports = function (grunt) { 'compass:dist',<% } else { %> 'copy:styles',<% } %> 'imagemin', - 'svgmin', - 'htmlmin' + 'svgmin' ] }, @@ -440,7 +435,8 @@ module.exports = function (grunt) { 'cssmin', 'uglify', 'rev', - 'usemin' + 'usemin', + 'htmlmin' ]); grunt.registerTask('default', [