figma-tokens-flattener 1.0.2 → 1.0.4
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 +5 -4
- package/index.js +5 -3
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -13,10 +13,10 @@ Create a figma-tokens-flattener-config.json file in your project root:
|
|
|
13
13
|
```
|
|
14
14
|
{
|
|
15
15
|
"source": {
|
|
16
|
-
"tokensFile": "src/tokens/tokens.json"
|
|
16
|
+
"tokensFile": "src/tokens/tokens.json" // path to the token file
|
|
17
17
|
},
|
|
18
18
|
"target": {
|
|
19
|
-
"jsonsDir": "src/tokens"
|
|
19
|
+
"jsonsDir": "src/tokens" // path for the created files
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
```
|
|
@@ -32,14 +32,14 @@ Add a script to your package.json:
|
|
|
32
32
|
```
|
|
33
33
|
{
|
|
34
34
|
"scripts": {
|
|
35
|
-
"flatten-tokens": "
|
|
35
|
+
"flatten-tokens": "figma-tokens-flattener flatten"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
And run with:
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
`npm run flatten-tokens`
|
|
43
43
|
|
|
44
44
|
## How It Works
|
|
45
45
|
|
|
@@ -52,6 +52,7 @@ And run with:
|
|
|
52
52
|
4. Result Saving - Creates separate JSON files for each theme
|
|
53
53
|
|
|
54
54
|
## Output
|
|
55
|
+
|
|
55
56
|
After running the command, the following files will be created in the target directory:
|
|
56
57
|
|
|
57
58
|
light-theme-tokens.json - tokens for light theme
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "figma-tokens-flattener",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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
|
+
"bin": {
|
|
7
|
+
"figma-tokens-flattener": "index.js"
|
|
8
|
+
},
|
|
6
9
|
"scripts": {
|
|
7
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
11
|
},
|
|
9
|
-
"keywords": [],
|
|
12
|
+
"keywords": ["figma", "design-tokens", "tokens", "json", "flattener", "transformer", "parser"],
|
|
10
13
|
"author": "Yurii Sudarskii",
|
|
11
14
|
"license": "ISC"
|
|
12
15
|
}
|