-
Notifications
You must be signed in to change notification settings - Fork 0
/
svgo.yml
57 lines (55 loc) · 3.72 KB
/
svgo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
multipass: true
# full: true
plugins:
# - addClassesToSVGElement # adds classnames to an outer <svg> element
- applyTransforms: true # ?
- applyTransformsStroked # ?
- cleanupAttrs # cleanups attributes from newlines, trailing and repeating spaces
- cleanupEnableBackground # remove or cleanup enable-background attribute when possible
- cleanupIDs: true # removes unused IDs and minifies used
- cleanupListOfValues # rounds list of values to the fixed precision
- cleanupNumericValues # rounds numeric values to the fixed precision, removes default ‘px’ units
- collapseGroups # collapses useless groups
- convertColors # converts colors: rgb() to #rrggbb and #rrggbb to #rgb
- convertPathData: true # optimizes path data: writes in shorter form, applies transformations
- convertShapeToPath: false # converts basic shapes to more compact path form
- convertStyleToAttrs # converts style to attributes
- convertTransform # collapses multiple transformations and optimizes it
- curveSmoothShorthands # ?
- floatPrecision: 2 # ?
- lineShorthands # ?
- mergePaths: false # merges multiple paths in one if possible
- minifyStyles # minifies existing styles in svg
- moveElemsAttrsToGroup # moves elements attributes to the existing group wrapper
- moveGroupAttrsToElems # moves some group attributes to the content elements
# - removeAttrs: false # removes specified attributes
- removeComments # removes comments
- removeDesc # removes <desc> (only non-meaningful by default)
- removeDimensions: true # removes width and height in presence of viewBox
- removeDoctype: true # removes doctype declaration
- removeEditorsNSData # removes editors namespaces, elements and attributes
- removeEmptyAttrs # removes empty attributes
- removeEmptyContainers # removes empty container elements
- removeEmptyText # removes empty <text> elements
- removeHiddenElems # removes hidden elements (zero sized, with absent attributes)
- removeMetadata # removes <metadata>
- removeNonInheritableGroupAttrs # removes non-inheritable group’s presentational attributes
# - removeRasterImages # removes raster images (disabled by default)
# - removeStyleElement # removes <style> element (disabled by default)
- removeTitle # removes <title> (disabled by default)
- removeUnknownsAndDefaults # removes unknown elements content and attributes, removes attrs with default values
- removeUnusedNS # removes unused namespaces declaration
- removeUselessDefs # removes elements in <defs> without id
- removeUselessStrokeAndFill # removes useless stroke and fill attributes
# - removeViewBox # removes viewBox attribute when possible (disabled by default)
- removeXMLProcInst # removes XML processing instructions
- sortAttrs # sorts element attributes (disabled by default)
- straightCurves # ?
- transformsWithOnePath # performs a set of operations on SVG with one path inside (disabled by default)
# 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
#
js2svg:
pretty: true
indent: ' '