From b3b972073389038f24ddfed96d80b975a1e41ee6 Mon Sep 17 00:00:00 2001 From: Volker E Date: Tue, 15 May 2018 00:35:27 -0700 Subject: [PATCH] build: Extend 'svgmin' options and move to 'minify' task Also re-crush all SVGs. Bug: T185596 Change-Id: I9f2be4b1b5c4c0597d4040250d87c939567cb83b --- Gruntfile.js | 6 ++++-- modules/icons/mention-progressive.svg | 3 +-- modules/icons/mention-status-bundle-progressive.svg | 2 +- modules/icons/revert.svg | 5 +---- modules/icons/user-rights-progressive.svg | 2 +- modules/icons/user-speech-bubble.svg | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 49ffe9c73..2df0b98d1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -36,6 +36,7 @@ module.exports = function ( grunt ) { indent: ' ', pretty: true }, + multipass: true, plugins: [ { cleanupIDs: false }, { @@ -83,7 +84,8 @@ module.exports = function ( grunt ) { } } ); + grunt.registerTask( 'minify', 'svgmin' ); grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); - grunt.registerTask( 'test', 'lint', 'svgmin' ); - grunt.registerTask( 'default', 'test' ); + grunt.registerTask( 'test', 'lint' ); + grunt.registerTask( 'default', [ 'minify', 'test' ] ); }; diff --git a/modules/icons/mention-progressive.svg b/modules/icons/mention-progressive.svg index 12aa0f3e3..c69b0df4a 100644 --- a/modules/icons/mention-progressive.svg +++ b/modules/icons/mention-progressive.svg @@ -4,8 +4,7 @@ mention - - + diff --git a/modules/icons/mention-status-bundle-progressive.svg b/modules/icons/mention-status-bundle-progressive.svg index a4e540b81..0fb0b4615 100644 --- a/modules/icons/mention-status-bundle-progressive.svg +++ b/modules/icons/mention-status-bundle-progressive.svg @@ -1,5 +1,5 @@ - + mention status bundle diff --git a/modules/icons/revert.svg b/modules/icons/revert.svg index 3dcee1b96..d3914bc92 100644 --- a/modules/icons/revert.svg +++ b/modules/icons/revert.svg @@ -3,8 +3,5 @@ revert - - - - + diff --git a/modules/icons/user-rights-progressive.svg b/modules/icons/user-rights-progressive.svg index a1a11e5e3..0f5708b2b 100644 --- a/modules/icons/user-rights-progressive.svg +++ b/modules/icons/user-rights-progressive.svg @@ -5,6 +5,6 @@ - + diff --git a/modules/icons/user-speech-bubble.svg b/modules/icons/user-speech-bubble.svg index cc844bff2..9435205e2 100644 --- a/modules/icons/user-speech-bubble.svg +++ b/modules/icons/user-speech-bubble.svg @@ -3,5 +3,5 @@ user speech bubble - +