mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 15:44:09 +00:00
f47e333ff1
Enabling SVGO automation with 'grunt-svgmin' and conservative plugin settings to build step, among those: - enable removeRasterImages and sortAttrs, - disable cleanupIDs, removeDesc, removeTitle, & removeViewBox as described in https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration - disable removeXMLProcInst; if the SVG doesn't start with an XML declaration, then it's MIME type will be detected as "text/plain" rather than "image/svg+xml" by libmagic and, consequently, MediaWiki's CSSMin CSS minifier. libmagic's default database currently requires that SVGs contain an XML declaration: <https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5>. - make use of pretty and multipass options. Settings are stored in a JSON file to be independent of the Grunt build process. Also updating SVG accordingly. Bug: T185596 Change-Id: I715ad4cf2e900665e4c32c78b4c2d9d9cebf0222
31 lines
389 B
JSON
31 lines
389 B
JSON
{
|
|
"multipass": true,
|
|
"js2svg": {
|
|
"pretty": true,
|
|
"indent": "\t"
|
|
},
|
|
"plugins": [
|
|
{
|
|
"collapseGroups": false
|
|
},
|
|
{
|
|
"mergePaths": false
|
|
},
|
|
{
|
|
"cleanupIDs": false
|
|
},
|
|
{
|
|
"removeDesc": false
|
|
},
|
|
{
|
|
"removeTitle": false
|
|
},
|
|
{
|
|
"removeViewBox": false
|
|
},
|
|
{
|
|
"removeXMLProcInst": false
|
|
}
|
|
]
|
|
}
|