JSON
This template helps you pull your design tokens in JSON.
This example uses the following parser:
to-json to generate your design tokens in JSON
If you use the CLI, you need to fill three properties:
repositoryis@organization/repositorypersonalAccessTokenwhich you can generate in your account settingsrulesare where you provide parsers and compatible options
{
"version": "2",
"repository": "@organization/repository",
// Only use the personalAccessToken when working with the CLI
"personalAccessToken": "<your-personal-access-token>",
"rules": [
{
"name": "Generate tokens in JSON",
"parsers": [
{
"name": "to-json",
"output": {
"type": "file",
"filePath": "output/tokens.json"
}
}
]
}
]
}If you use the GitHub, you need to fill 4 properties:
repositoryis@organization/repositoryheadlets you set the branch your PR will be created onbaselets you set the branch your PR will be merged onruleslets you transform tokens by chaining parsers
{
"version": "2",
"head": "specifyrc-json",
"base": "main",
"repository": "@organization/repository",
"rules": [
{
"name": "Generate tokens in JSON",
"parsers": [
{
"name": "to-sdtf",
"output": {
"type": "file",
"filePath": "output/tokens.json"
}
}
]
}
]
}Last updated
Was this helpful?