Skip to content

Commit

Permalink
feat: add support for JSON flat and nested #144
Browse files Browse the repository at this point in the history
This commit adds a config setting to export all tokens as JSON formatted
files. Both as flat and nested options.

Changes to be committed:
modified:   scripts/config.json
  • Loading branch information
blackfalcon authored and jason-capsule42 committed May 9, 2024
1 parent 03a5114 commit af7a657
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@
}
]
},
"JSONVariables": {
"transformGroup": "css",
"prefix": "ds",
"comment": "File type: JSON; variable type: CSS; filter: public",
"buildPath": "./dist/tokens/",
"files": [
{
"destination": "JSONVariablesFlat.json",
"format": "json/flat",
"filter": {
"public": true
}
},
{
"destination": "JSONVariablesNested.json",
"format": "json/nested",
"filter": {
"public": true
}
}
]
},
"SCSSVariableMap": {
"transformGroup": "scss",
"prefix": "ds",
Expand Down

0 comments on commit af7a657

Please sign in to comment.