Skip to content

Instantly share code, notes, and snippets.

@ChucKN0risK
Created July 7, 2023 17:42
Show Gist options
  • Save ChucKN0risK/ef543ed0e110666affc8e0e138fee042 to your computer and use it in GitHub Desktop.
Save ChucKN0risK/ef543ed0e110666affc8e0e138fee042 to your computer and use it in GitHub Desktop.
Generate unique ids on SVG files
{
"repository": "@acme-inc/all-design-data",
"personalAccessToken": "0210baf240fcbad016552bdbdceda65c134c1af92b3d6ce0d1226804ced0fa8d",
"rules": [
{
"name": "Design Tokens / Vector",
"path": "./priv/static/assets/designsystem/vectors",
"filter": {
"types": [
"vector"
]
},
"parsers": [
{
"name": "kebabcasify"
},
{
"name": "svgo",
"options": {
"svgo": {
"js2svg": {
"pretty": true
},
"plugins": [
{
"name": "removeDimensions"
},
{
"name": "convertColors",
"params": {
"currentColor": true
}
},
{
"name": "addAttributesToSVGElement",
"params": {
"attributes": ["focusable=\"false\""]
}
},
{
"name": "prefixIds"
}
]
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment