diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 37ba3da7b..ca9c5a0a3 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -119,12 +119,12 @@ module.exports = (grunt) -> ] uglify: - dist: - options: - report: "gzip" - compress: - drop_console: true + options: + report: "gzip" + compress: + drop_console: true + dist: files: [ { expand: true @@ -140,6 +140,9 @@ module.exports = (grunt) -> } ] + sw: + files: "<%= config.dist %><%= config.base %>/service-worker.js": [ "<%= config.dist %><%= config.base %>/service-worker.js" ] + less: options: strictMath: true @@ -713,7 +716,7 @@ module.exports = (grunt) -> grunt.registerTask "build", "Build site with jekyll", [ "clean:main" "coffeelint" - "uglify" + "uglify:dist" "lesslint" "less:dist" "postcss:dist" @@ -726,6 +729,7 @@ module.exports = (grunt) -> "cacheBust" "concurrent:dist" "sw_precache" + "uglify:sw" "cleanempty" ]