Skip to content

Commit 2b85a52

Browse files
committed
feat(app): use htmlmin for smaller HTML files
Use htmlmin options to minify the HTML correctly. Only 'safe' options are used Fixes #469
1 parent ba7b505 commit 2b85a52

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Diff for: templates/common/Gruntfile.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,10 @@ module.exports = function (grunt) {
273273
htmlmin: {
274274
dist: {
275275
options: {
276-
// Optional configurations that you can uncomment to use
277-
// removeCommentsFromCDATA: true,
278-
// collapseBooleanAttributes: true,
279-
// removeAttributeQuotes: true,
280-
// removeRedundantAttributes: true,
281-
// useShortDoctype: true,
282-
// removeEmptyAttributes: true,
283-
// removeOptionalTags: true*/
276+
collapseWhitespace: true,
277+
collapseBooleanAttributes: true,
278+
removeCommentsFromCDATA: true,
279+
removeOptionalTags: true
284280
},
285281
files: [{
286282
expand: true,
@@ -358,8 +354,7 @@ module.exports = function (grunt) {
358354
'compass:dist',<% } else { %>
359355
'copy:styles',<% } %>
360356
'imagemin',
361-
'svgmin',
362-
'htmlmin'
357+
'svgmin'
363358
]
364359
},
365360

@@ -440,7 +435,8 @@ module.exports = function (grunt) {
440435
'cssmin',
441436
'uglify',
442437
'rev',
443-
'usemin'
438+
'usemin',
439+
'htmlmin'
444440
]);
445441

446442
grunt.registerTask('default', [

0 commit comments

Comments
 (0)