talos
1# Usage:
2# install svgo globally: `npm i -g svgo`
3# svgo --config=build/svgo.yml --input=foo.svg
4
5# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md
6# replace default config
7
8multipass: true
9#full: true
10
11# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
12
13js2svg:
14pretty: true
15indent: 2
16
17plugins:
18# remove this with IE 11 is no longer supported
19- addAttributesToSVGElement:
20attributes:
21- focusable: false
22- cleanupAttrs: true
23- cleanupEnableBackground: true
24- cleanupIDs: true
25- cleanupListOfValues: true
26- cleanupNumericValues: true
27- collapseGroups: true
28- convertColors: true
29- convertPathData: true
30- convertShapeToPath: true
31- convertStyleToAttrs: true
32- convertTransform: true
33- inlineStyles: true
34- mergePaths: true
35- minifyStyles: true
36- moveElemsAttrsToGroup: true
37- moveGroupAttrsToElems: true
38- removeAttrs:
39attrs:
40- "data-name"
41- removeComments: true
42- removeDesc: true
43- removeDoctype: true
44- removeEditorsNSData: true
45- removeEmptyAttrs: true
46- removeEmptyContainers: true
47- removeEmptyText: true
48- removeHiddenElems: true
49- removeMetadata: true
50- removeNonInheritableGroupAttrs: true
51- removeTitle: false
52- removeUnknownsAndDefaults:
53keepRoleAttr: true
54- removeUnusedNS: true
55- removeUselessDefs: true
56- removeUselessStrokeAndFill: true
57- removeViewBox: false
58- removeXMLNS: false
59- removeXMLProcInst: true
60- sortAttrs: true
61