diff options
author | Brian Evans <grknight@gentoo.org> | 2022-09-27 18:53:03 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2022-09-27 19:02:02 -0400 |
commit | 5ca8d30155e11d97b20f79acec40632c2e06fcd5 (patch) | |
tree | 7531fb116791f8328c0bb0cabe42265ca67e6df9 /MLEB/UniversalLanguageSelector/.svgo.config.js | |
parent | Merge branch 'master' into wikitest (diff) | |
download | extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.tar.gz extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.tar.bz2 extensions-5ca8d30155e11d97b20f79acec40632c2e06fcd5.zip |
Update MLEB to 2021.12v1.35.2
This is the final version for MW 1.35
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/UniversalLanguageSelector/.svgo.config.js')
-rw-r--r-- | MLEB/UniversalLanguageSelector/.svgo.config.js | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/MLEB/UniversalLanguageSelector/.svgo.config.js b/MLEB/UniversalLanguageSelector/.svgo.config.js new file mode 100644 index 00000000..e2abffbd --- /dev/null +++ b/MLEB/UniversalLanguageSelector/.svgo.config.js @@ -0,0 +1,55 @@ +/** + * SVGO Configuration + * Recommended options from: + * https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration + */ +const { extendDefaultPlugins } = require( 'svgo' ); +module.exports = { + multipass: true, + plugins: extendDefaultPlugins( [ + { + name: 'cleanupIDs', + active: false + }, + { + name: 'removeDesc', + active: false + }, + { + name: 'removeRasterImages', + active: true + }, + { + name: 'removeTitle', + active: false + }, + { + name: 'removeViewBox', + active: false + }, + { + // If the SVG doesn't start with an XML declaration, then its 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 + name: 'removeXMLProcInst', + active: false + }, + { + name: 'sortAttrs', + active: true + } + ] ), + + // Configure the indent (default 4 spaces) used by `--pretty` here: + // @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options + // + // Unfortunately EOL cannot be configured, SVGO uses the platform's EOL marker. + // On non-unix systems the linebreaks will be normalized to LF (unix) only at git commit, + // assuming `core.autocrlf` is 'true' (default) or 'input'. + js2svg: { + indent: "\t", + pretty: true, + } +} |