Skip to content

Commit

Permalink
Merge 44d712b into f9d3fed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann authored Nov 22, 2023
2 parents f9d3fed + 44d712b commit 6f11d19
Show file tree
Hide file tree
Showing 8 changed files with 386 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-shrimps-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/primitives': patch
---

adding CodeSyntax to tokens for figma
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.formatOnSave": true,
"prettier.configPath": ".prettierrc.js",
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
3 changes: 2 additions & 1 deletion src/formats/jsonFigma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const jsonFigma: StyleDictionary.Formatter = ({dictionary, file: _file, p
// sort tokens by reference
const tokens = dictionary.allTokens.sort(sortByReference(dictionary)).map(token => {
const {attributes, value, $type, comment: description, original, alpha, mix} = token
const {mode, collection, scopes, group} = attributes || {}
const {mode, collection, scopes, group, codeSyntax} = attributes || {}

return {
name: token.name,
Expand All @@ -52,6 +52,7 @@ export const jsonFigma: StyleDictionary.Formatter = ({dictionary, file: _file, p
mode,
group,
scopes,
codeSyntax,
}
})
// add file header and convert output
Expand Down
Loading

0 comments on commit 6f11d19

Please sign in to comment.