svgo.yml 1.4 KB

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