svgo.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # - addAttributesToSVGElement:
  14. # attributes:
  15. # - focusable: false
  16. - cleanupAttrs: true
  17. - cleanupEnableBackground: true
  18. - cleanupIDs: true
  19. - cleanupListOfValues: true
  20. - cleanupNumericValues: true
  21. - collapseGroups: true
  22. - convertColors: true
  23. - convertPathData: true
  24. - convertShapeToPath: true
  25. - convertStyleToAttrs: true
  26. - convertTransform: true
  27. - inlineStyles: true
  28. - mergePaths: true
  29. - minifyStyles: true
  30. - moveElemsAttrsToGroup: true
  31. - moveGroupAttrsToElems: true
  32. - removeAttrs:
  33. attrs:
  34. - "data-name"
  35. - removeComments: true
  36. - removeDesc: true
  37. - removeDoctype: true
  38. - removeEditorsNSData: true
  39. - removeEmptyAttrs: true
  40. - removeEmptyContainers: true
  41. - removeEmptyText: true
  42. - removeHiddenElems: true
  43. - removeMetadata: true
  44. - removeNonInheritableGroupAttrs: true
  45. - removeTitle: false
  46. - removeUnknownsAndDefaults:
  47. keepRoleAttr: true
  48. - removeUnusedNS: true
  49. - removeUselessDefs: true
  50. - removeUselessStrokeAndFill: true
  51. - removeViewBox: false
  52. - removeXMLNS: false
  53. - removeXMLProcInst: true
  54. - sortAttrs: true