Links

SDTF

This template helps you pull your design tokens in the SDTF format in a JSON file.
This example uses the following parser:
  • to-sdtf to generate your design tokens in SDTF
Config (CLI)
Config (GitHub)
If you use the CLI, you need to fill three properties:
  • repository is @organization/repository
  • personalAccessToken which you can generate in your account settings
  • rules are where you provide parsers and compatible options
.specifyrc.json
1
{
2
"version": "2",
3
"repository": "@organization/repository",
4
// Only use the personalAccessToken when working with the CLI
5
"personalAccessToken": "<your-personal-access-token>",
6
"rules": [
7
{
8
"name": "Generate tokens in SDTF",
9
"parsers": [
10
{
11
"name": "to-sdtf",
12
"output": {
13
"type": "file",
14
"filePath": "output/tokens.json"
15
}
16
}
17
]
18
}
19
]
20
}
If you use the GitHub, you need to fill 4 properties:
  • repository is @organization/repository
  • head lets you set the branch your PR will be created on
  • base lets you set the branch your PR will be merged on
  • rules lets you transform tokens by chaining parsers
Make sure you have connected your GitHub account with your Specify account. Head toward this article to learn more.
.specifyrc.json
1
{
2
"version": "2",
3
"head": "specifyrc-json",
4
"base": "main",
5
"repository": "@organization/repository",
6
"rules": [
7
{
8
"name": "Generate tokens in JSON",
9
"parsers": [
10
{
11
"name": "to-sdtf",
12
"output": {
13
"type": "file",
14
"filePath": "output/tokens.json"
15
}
16
}
17
]
18
}
19
]
20
}
Last modified 30d ago