talos

Форк
0
60 строк · 1.5 Кб
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

8
multipass: true
9
#full: true
10

11
# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
12

13
js2svg:
14
  pretty: true
15
  indent: 2
16

17
plugins:
18
  # remove this with IE 11 is no longer supported
19
  - addAttributesToSVGElement:
20
      attributes:
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:
39
      attrs:
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:
53
      keepRoleAttr: true
54
  - removeUnusedNS: true
55
  - removeUselessDefs: true
56
  - removeUselessStrokeAndFill: true
57
  - removeViewBox: false
58
  - removeXMLNS: false
59
  - removeXMLProcInst: true
60
  - sortAttrs: true
61

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.