ILoadBalancer/ILBFactory: Rename beginMasterChanges() to beginPrimaryChanges()
[mediawiki.git] / .svgo.config.js
blobe2abffbd7dddb396f35f0a951c7464c29c48f0e4
1 /**
2  * SVGO Configuration
3  * Recommended options from:
4  * https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
5  */
6 const { extendDefaultPlugins } = require( 'svgo' );
7 module.exports = {
8         multipass: true,
9         plugins: extendDefaultPlugins( [
10                 {
11                         name: 'cleanupIDs',
12                         active: false
13                 },
14                 {
15                         name: 'removeDesc',
16                         active: false
17                 },
18                 {
19                         name: 'removeRasterImages',
20                         active: true
21                 },
22                 {
23                         name: 'removeTitle',
24                         active: false
25                 },
26                 {
27                         name: 'removeViewBox',
28                         active: false
29                 },
30                 {
31                         // If the SVG doesn't start with an XML declaration, then its MIME type will
32                         // be detected as "text/plain" rather than "image/svg+xml" by libmagic and,
33                         // consequently, MediaWiki's CSSMin CSS minifier. libmagic's default database
34                         // currently requires that SVGs contain an XML declaration:
35                         // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5
36                         name: 'removeXMLProcInst',
37                         active: false
38                 },
39                 {
40                         name: 'sortAttrs',
41                         active: true
42                 }
43         ] ),
45         // Configure the indent (default 4 spaces) used by `--pretty` here:
46         // @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
47         //
48         // Unfortunately EOL cannot be configured, SVGO uses the platform's EOL marker.
49         // On non-unix systems the linebreaks will be normalized to LF (unix) only at git commit,
50         // assuming `core.autocrlf` is 'true' (default) or 'input'.
51         js2svg: {
52                 indent: "\t",
53                 pretty: true,
54         }