From d35a48e6838f8c73be725c7b7f0dd1a606ae80f1 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Sat, 18 Jun 2016 21:49:32 +0100 Subject: [PATCH] minfiy css as well --- services/web/Gruntfile.coffee | 9 ++++++++- services/web/package.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/Gruntfile.coffee b/services/web/Gruntfile.coffee index 9c47dfec55..1fae80dd90 100644 --- a/services/web/Gruntfile.coffee +++ b/services/web/Gruntfile.coffee @@ -18,6 +18,7 @@ module.exports = (grunt) -> grunt.loadNpmTasks 'grunt-parallel' grunt.loadNpmTasks 'grunt-exec' grunt.loadNpmTasks 'grunt-contrib-imagemin' + grunt.loadNpmTasks 'grunt-contrib-cssmin' config = @@ -55,6 +56,7 @@ module.exports = (grunt) -> dest: 'public/img/' }] options: + interlaced:false optimizationLevel: 7 @@ -123,6 +125,11 @@ module.exports = (grunt) -> files: "public/stylesheets/style.css": "public/stylesheets/style.less" + cssmin: + target: + files: + "public/stylesheets/style.css": "public/stylesheets/style.css" + env: run: add: @@ -347,7 +354,7 @@ module.exports = (grunt) -> grunt.registerTask 'compile:server', 'Compile the server side coffee script', ['clean:app', 'coffee:app', 'coffee:app_dir', 'compile:modules:server'] grunt.registerTask 'compile:client', 'Compile the client side coffee script', ['coffee:client', 'coffee:sharejs', 'wrap_sharejs', "compile:modules:client", 'compile:modules:inject_clientside_includes'] grunt.registerTask 'compile:css', 'Compile the less files to css', ['less'] - grunt.registerTask 'compile:minify', 'Concat and minify the client side js', ['requirejs', "file_append"] + grunt.registerTask 'compile:minify', 'Concat and minify the client side js', ['requirejs', "file_append", "cssmin"] grunt.registerTask 'compile:unit_tests', 'Compile the unit tests', ['clean:unit_tests', 'coffee:unit_tests'] grunt.registerTask 'compile:acceptance_tests', 'Compile the acceptance tests', ['clean:acceptance_tests', 'coffee:acceptance_tests'] grunt.registerTask 'compile:smoke_tests', 'Compile the smoke tests', ['coffee:smoke_tests'] diff --git a/services/web/package.json b/services/web/package.json index 7c4f2e839b..3f077d61fd 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -69,6 +69,7 @@ "grunt-bunyan": "0.5.0", "grunt-contrib-clean": "0.5.0", "grunt-contrib-coffee": "0.10.0", + "grunt-contrib-cssmin": "^1.0.1", "grunt-contrib-imagemin": "^1.0.1", "grunt-contrib-less": "0.9.0", "grunt-contrib-requirejs": "0.4.1",