From a31dbdce7181388e68da07c30e8ac7ed249ccfeb Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Tue, 14 Jun 2016 16:59:41 +1000 Subject: Revert "Remove grunt-contrib-htmlmin HTML minification" This reverts commit 51d101f50785b0da88deaf4ede6031fbc7176c7a. --- Gruntfile.js | 18 +++++++++++++++++- package.json | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 488e5b7..26209b1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,6 +23,21 @@ module.exports = function (grunt) { ], } }, + htmlmin: { + dist: { + options: { + removeComments: true, + collapseWhitespace: true, + removeEmptyAttributes: true + }, + files: [{ + expand: true, + cwd: 'dist/', + src: '*.html', + dest: 'dist/' + }] + } + }, uglify: { options: { banner: '/*! <%= pkg.name %> (<%= pkg.repository.url %>) @ <%= grunt.template.today("yyyy-mm-dd") %> */\n' + @@ -68,8 +83,9 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-swig'); grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.registerTask('default', ['swig', 'cssmin', 'uglify', 'copy']); + grunt.registerTask('default', ['swig', 'htmlmin', 'cssmin', 'uglify', 'copy']); }; diff --git a/package.json b/package.json index 1080993..a175943 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^1.0.1", "grunt-contrib-uglify": "^1.0.1", + "grunt-contrib-htmlmin": "^0.5.0", "grunt-swig": "^0.2.1" } } -- cgit v1.2.3