Skip to content

Commit

Permalink
Install style-dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Anboias committed Nov 29, 2023
1 parent 0a5e2d0 commit 1531e35
Show file tree
Hide file tree
Showing 4 changed files with 865 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ Repositories can import the latest CSS variables to ensure UI components are sty
#### App.tsx

```text
import 'figmatokenspublic/build/css/_variables.css';
import 'figmatokenspublic/build/css/_variables.css';
```

## Initial Setup

- Clone repo locally
- Run npm install
- Install style-dictionary globally: `npm install -g style-dictionary`
- Generate the styled dictionary setup: `style-dictionary init basic`
- Delete build and tokens folders
- Replace content of config.json with the one from here: https://amzn.github.io/style-dictionary/#/config (remove android part and replace scss with css)

## Contributing

Changes to design tokens should be made in the Figma file. This repository is for distribution purposes only and does not accept direct modifications to the design tokens.
Expand Down
15 changes: 15 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"source": ["tokens/**/*.json"],
"platforms": {
"scss": {
"transformGroup": "css",
"buildPath": "build/css/",
"files": [
{
"destination": "_variables.css",
"format": "css/variables"
}
]
}
}
}
Loading

0 comments on commit 1531e35

Please sign in to comment.