From 1934283c1e8823dd48d0865a2d2bb18ded70eeeb Mon Sep 17 00:00:00 2001 From: Tunghsiao Liu Date: Wed, 1 Jun 2016 20:03:36 +0800 Subject: [PATCH] feat(grunt): add support for better minified output --- Gruntfile.coffee | 14 ++++++++++++-- TODOS.md | 2 -- package.json | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 3f8eb0d7d..9273e9615 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -245,6 +245,15 @@ module.exports = (grunt) -> dest: "<%= config.dist %>" ] + uncss_inline: + dist: + files: [ + expand: true + cwd: "<%= config.dist %>" + src: "**/*.html" + dest: "<%= config.dist %>" + ] + leading_quotes: options: elements: "p, h1, h2, h3, h4, h5, h6" @@ -578,7 +587,7 @@ module.exports = (grunt) -> "less:serve" "postcss:serve" "jekyll:serve" - "leading_quotes:main" + "leading_quotes" "browserSync" "watch" ] @@ -604,9 +613,10 @@ module.exports = (grunt) -> "postcss:dist" "csscomb" "jekyll:dist" - "leading_quotes:main" + "leading_quotes" "cssmin" "assets_inline" + "uncss_inline" "cacheBust" "concurrent:dist" "usebanner" diff --git a/TODOS.md b/TODOS.md index e6b3ac23c..63908f619 100644 --- a/TODOS.md +++ b/TODOS.md @@ -1,5 +1,3 @@ # Todos - try load-grunt-config -- responsive tables -- try Service Worker diff --git a/package.json b/package.json index e24f2e971..94a487f0e 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "grunt-rev": "^0.1.0", "grunt-shell": "^1.2.1", "grunt-text-replace": "^0.4.0", + "grunt-uncss-inline": "^1.0.1", "grunt-xmlmin": "^0.1.7", "jit-grunt": "^0.10.0", "time-grunt": "^1.3.0"