From 72e0f35e7c7afbc4f2a91f30767ccac6580a6cf1 Mon Sep 17 00:00:00 2001 From: Tunghsiao Liu Date: Sat, 11 Feb 2017 21:05:45 +0800 Subject: [PATCH] feat(grunt): add `html_trim` support --- Gruntfile.coffee | 10 ++++++++++ package.json | 1 + 2 files changed, 11 insertions(+) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 9acb5cbf3..91386eb36 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -228,6 +228,15 @@ module.exports = (grunt) -> # src: "**/*.html" # dest: "<%= config.dist %>" + html_trim: + dist: + files: [ + expand: true + cwd: "<%= config.dist %>" + src: ["**/*.html"] + dest: "<%= config.dist %>" + ] + assets_inline: options: jsDir: "<%= config.dist %>" @@ -703,6 +712,7 @@ module.exports = (grunt) -> "uncss_inline" "cacheBust" "concurrent:dist" + "html_trim" "service_worker" "uglify:sw" "cleanempty" diff --git a/package.json b/package.json index c6f8b9cf9..2b0fd66b6 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "grunt-conventional-changelog": "^6.1.0", "grunt-csscomb": "^3.1.1", "grunt-git": "^1.0.0", + "grunt-html-trim": "^0.1.0", "grunt-jekyll": "^0.4.4", "grunt-leading-quotes": "0.0.13", "grunt-minjson": "^0.4.0",