Skip to content

Instantly share code, notes, and snippets.

@ChucKN0risK
Created October 7, 2022 14:08
Show Gist options
  • Save ChucKN0risK/354bedcfeec974892dbf7b78965ae0d6 to your computer and use it in GitHub Desktop.
Save ChucKN0risK/354bedcfeec974892dbf7b78965ae0d6 to your computer and use it in GitHub Desktop.
Generate measurements in rem for Tailwind
{
"repository": "YOUR_SPECIFY_REPO",
"personalAccessToken": "YOUR_PAT",
"rules": [
{
"name": "Design Tokens / Everything but measurements",
"path": "./output/theme.js",
"filter": {
"types": [
"color",
"textStyle",
"font"
]
},
"parsers": [
{
"name": "to-tailwind",
"options": {
"formatName": "camelCase",
"formatConfig": {
"objectName": "extend",
"module": "commonjs"
}
}
}
]
},
{
"name": "Design Tokens / Measurements",
"path": "./output/measuemrent.js",
"filter": {
"types": [
"measurement"
]
},
"parsers": [
{
"name": "px-to-rem",
"options": {
"keys": ["value"]
}
},
{
"name": "to-tailwind",
"options": {
"formatName": "camelCase",
"formatConfig": {
"objectName": "extend",
"module": "commonjs"
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment