summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Whalan <ewhal@pantsu.cat>2016-06-14 08:59:41 +0200
committerEliot Whalan <ewhal@pantsu.cat>2016-06-14 08:59:41 +0200
commita31dbdce7181388e68da07c30e8ac7ed249ccfeb (patch)
tree9184f111011ee47069d1f6bc5445c4c893b92370
parentd16a49a74aaf0edabcb99fd9c7f9f58411ab032e (diff)
Revert "Remove grunt-contrib-htmlmin HTML minification"
This reverts commit 51d101f50785b0da88deaf4ede6031fbc7176c7a.
-rw-r--r--Gruntfile.js18
-rw-r--r--package.json1
2 files changed, 18 insertions, 1 deletions
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"
}
}