figma-tokens-flattener 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,34 +4,34 @@ A tool for transforming Ant Design tokens from Tokens Studio for Figma (Single f
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`npm install figma-tokens-flattener --save-dev`
|
|
8
8
|
|
|
9
9
|
## Create Configuration
|
|
10
10
|
|
|
11
11
|
Create a figma-tokens-flattener-config.json file in your project root:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
``{
|
|
14
14
|
"source": {
|
|
15
15
|
"tokensFile": "src/tokens/tokens.json"
|
|
16
16
|
},
|
|
17
17
|
"target": {
|
|
18
18
|
"jsonsDir": "src/tokens"
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}``
|
|
21
21
|
|
|
22
22
|
## Run Transformation
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
`npx simple-token-transformer flatten`
|
|
25
25
|
|
|
26
26
|
## Alternative Way (Recommended)
|
|
27
27
|
|
|
28
28
|
Add a script to your package.json:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
``{
|
|
31
31
|
"scripts": {
|
|
32
32
|
"flatten-tokens": "simple-token-transformer flatten"
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}``
|
|
35
35
|
|
|
36
36
|
And run with:
|
|
37
37
|
|
|
@@ -53,4 +53,3 @@ After running the command, the following files will be created in the target dir
|
|
|
53
53
|
light-theme-tokens.json - tokens for light theme
|
|
54
54
|
|
|
55
55
|
dark-theme-tokens.json - tokens for dark theme
|
|
56
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "figma-tokens-flattener",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A tool for transforming Ant Design tokens from Tokens Studio for Figma (Single file) into flat style mappings for light and dark themes.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|