Merge "build: Extend 'svgmin' options and move to 'minify' task"

This commit is contained in:
jenkins-bot 2018-05-30 15:24:35 +00:00 committed by Gerrit Code Review
commit 58e3c25729
6 changed files with 9 additions and 11 deletions

View file

@ -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' ] );
};

View file

@ -4,8 +4,7 @@
mention
</title>
<g fill="#36c">
<path d="M18 4h-1v7a2 2 0 0 1-2 2H4v1c0 1.1.9 2 2 2h10l4 4V6a2 2 0 0 0-2-2"/>
<path d="M7.98 4.7c-.2.1-.37.24-.51.4A1.98 1.98 0 0 0 7 6.38c0 .23.05.41.15.54.1.13.25.2.44.2.1 0 .2-.02.29-.05a.7.7 0 0 0 .28-.15c.09-.08.17-.18.24-.3.07-.13.14-.28.18-.47l.4-1.55a1.96 1.96 0 0 0-.36-.03c-.23 0-.44.05-.64.14"/>
<path d="M18 4h-1v7a2 2 0 0 1-2 2H4v1c0 1.1.9 2 2 2h10l4 4V6a2 2 0 0 0-2-2m-10.02.7c-.2.1-.37.24-.51.4A1.98 1.98 0 0 0 7 6.38c0 .23.05.41.15.54.1.13.25.2.44.2.1 0 .2-.02.29-.05a.7.7 0 0 0 .28-.15c.09-.08.17-.18.24-.3.07-.13.14-.28.18-.47l.4-1.55a1.96 1.96 0 0 0-.36-.03c-.23 0-.44.05-.64.14"/>
<path d="M12 6.28a2.8 2.8 0 0 1-.48.9 2.19 2.19 0 0 1-1.65.81c-.25 0-.48-.06-.67-.18a.91.91 0 0 1-.4-.56 1.8 1.8 0 0 1-1.47.74 1.33 1.33 0 0 1-1.3-.96 2.69 2.69 0 0 1 1.92-3.21 3.47 3.47 0 0 1 2.2.14L9.64 6c-.06.23-.09.42-.09.57 0 .15.03.27.07.35.04.09.1.15.19.18a.75.75 0 0 0 .71-.1c.14-.1.26-.23.36-.4.1-.18.19-.39.25-.63s.09-.5.09-.8c0-.47-.08-.89-.23-1.25A2.49 2.49 0 0 0 9.4 2.46a3.8 3.8 0 0 0-2.55.09A3.3 3.3 0 0 0 5.07 4.4a4.14 4.14 0 0 0 .03 2.97 3.22 3.22 0 0 0 1.92 1.84c.44.15.92.23 1.43.23a6.34 6.34 0 0 0 1.47-.18 4.92 4.92 0 0 0 1.01-.4c.1-.05.18-.07.25-.05.08.03.13.08.16.17l.2.49a5.34 5.34 0 0 1-3.09.85c-.66 0-1.28-.11-1.84-.32a4.1 4.1 0 0 1-2.43-2.33 4.89 4.89 0 0 1 .23-4.07A4.53 4.53 0 0 1 7 1.56a4.25 4.25 0 0 1 2.68.1c.48.17.9.42 1.27.75a3.59 3.59 0 0 1 1.21 2.77c0 .39-.05.76-.17 1.1M14 0H2a2 2 0 0 0-2 2v14l4-4h10a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" height="20" width="20">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<title>
mention status bundle
</title>

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View file

@ -3,8 +3,5 @@
<title>
revert
</title>
<g fill="#54595d">
<path d="M8.806 6.444L1 14.25V19h4.75l8.334-8.334z"/>
<path d="M13.714 2.929H13V.072L8 4l5 3.929V5.072h.714c2.286 0 4 1.428 4 4.285h2.143c0-4.285-3.857-6.428-6.143-6.428"/>
</g>
<path fill="#54595d" d="M8.806 6.444L1 14.25V19h4.75l8.334-8.334zm4.908-3.515H13V.072L8 4l5 3.929V5.072h.714c2.286 0 4 1.428 4 4.285h2.143c0-4.285-3.857-6.428-6.143-6.428"/>
</svg>

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 333 B

View file

@ -5,6 +5,6 @@
</title>
<g fill="#36c">
<path d="M20 16.288v-1.632l-1.012-.168c-.057-.226-.17-.45-.338-.788l.619-.844-1.181-1.181-.844.619a3.006 3.006 0 0 0-.788-.338l-.112-1.012h-1.632l-.168 1.012c-.282.056-.507.169-.788.338l-.844-.619-1.18 1.181.562.844c-.169.281-.225.506-.338.787L11 14.6v1.631l1.012.169c.057.281.17.506.338.787l-.563.844 1.182 1.182.844-.563c.224.113.506.225.787.338L14.769 20h1.687l.169-1.012c.281-.057.506-.17.787-.338l.844.619 1.182-1.181-.62-.844c.17-.281.282-.563.338-.788zm-4.5.843a1.657 1.657 0 0 1-1.688-1.687c0-.956.732-1.688 1.688-1.688s1.688.732 1.688 1.688-.732 1.687-1.688 1.687z"/>
<path d="M1.03 18.28c.01-.526.025-.74.064-.878.143-.496.398-.994.758-1.48.256-.346 1-1.078 1.394-1.371 1.393-1.038 3.068-1.678 5.057-1.934.535-.069 1.596-.12 1.964-.096l.323.022-.084.088-.084.087.285.426c.184.274.271.43.245.438-.036.012-.883.112-.938.111-.013 0-.024.764-.024 1.699v1.698l.532.088c.292.048.53.095.53.105 0 .01-.128.212-.286.45l-.287.432.404.405.403.404H1.016zM9.256 10.93A5.05 5.05 0 0 1 5.708 8.53a5.214 5.214 0 0 1-.657-1.942 5.799 5.799 0 0 1 .076-1.628 4.984 4.984 0 0 1 5.707-3.87c1.547.256 2.91 1.27 3.623 2.694 1.232 2.457.225 5.452-2.245 6.677a4.455 4.455 0 0 1-1.145.407c-.324.074-.452.087-.967.095a5.545 5.545 0 0 1-.844-.031z"/>
<path d="M1.03 18.28c.01-.526.025-.74.064-.878.143-.496.398-.994.758-1.48.256-.346 1-1.078 1.394-1.371 1.393-1.038 3.068-1.678 5.057-1.934.535-.069 1.596-.12 1.964-.096l.323.022-.084.088-.084.087.285.426c.184.274.271.43.245.438-.036.012-.883.112-.938.111-.013 0-.024.764-.024 1.699v1.698l.532.088c.292.048.53.095.53.105 0 .01-.128.212-.286.45l-.287.432.404.405.403.404H1.016zm8.226-7.35a5.05 5.05 0 0 1-3.548-2.4 5.214 5.214 0 0 1-.657-1.942 5.799 5.799 0 0 1 .076-1.628 4.984 4.984 0 0 1 5.707-3.87c1.547.256 2.91 1.27 3.623 2.694 1.232 2.457.225 5.452-2.245 6.677a4.455 4.455 0 0 1-1.145.407c-.324.074-.452.087-.967.095a5.545 5.545 0 0 1-.844-.031z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -3,5 +3,5 @@
<title>
user speech bubble
</title>
<path d="M14 16.8c-.96-.32-3.2-1.2-3.2-1.2-.72-.24-.72-.88-.8-1.6v-.08c1.12-.96 2-2.56 2-4.32 0-3.76-1.6-5.2-4-5.2-1.68 0-4 .96-4 5.2 0 1.68.88 3.28 2 4.32V14c0 .72-.08 1.36-.8 1.6 0 0-2.32.88-3.2 1.2-1.04.32-2 .8-2 2v.8h16v-.8c0-.96-.64-1.6-2-2zm.367-5.46l-1.796 2.938H24V4.4h-9.633v6.94z"/>
<path d="M14 16.8c-.96-.32-3.2-1.2-3.2-1.2-.72-.24-.72-.88-.8-1.6v-.08c1.12-.96 2-2.56 2-4.32 0-3.76-1.6-5.2-4-5.2-1.68 0-4 .96-4 5.2 0 1.68.88 3.28 2 4.32V14c0 .72-.08 1.36-.8 1.6 0 0-2.32.88-3.2 1.2-1.04.32-2 .8-2 2v.8h16v-.8c0-.96-.64-1.6-2-2zm.367-5.46l-1.796 2.938H24V4.4h-9.633v6.94z"/>
</svg>

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 464 B