-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add expandComposition #1110
add expandComposition #1110
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Commit SHA:16adee487c073993fb207916c1388017ead5dc36 Test coverage results 🧪
|
Commit SHA:effc3dd18b6f8983f2a888cd22169021c3fde49d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a few composition tokens in the https://github.com/six7/figma-tokens/tree/main/token-transformer/tokens files and make sure that we test that from a token-transformer level?
The "tests" there are basically running token-transformer with a few inputs that should then produce certain outputs: https://github.com/six7/figma-tokens/blob/main/token-transformer/package.json
Other than that this looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this in token-transformer/transform.test.js
? You'll need to add a output/composition.json
so the test know what is the expected result, you can look at the other tests to see how that was done.
Also, package.json
needs a change in the test
script (line 18):
Change "test": "npm run build-typography-test && npm run build-light-test && npm run build-dark-test && npm run build-folder-test && npm run build-resolve-false-test && jest"
to "test": "npm run build-typography-test && npm run build-light-test && npm run build-dark-test && npm run build-folder-test && npm run build-resolve-false-test && npm run build-composition-test && jest"
token-transformer/package.json
Outdated
@@ -10,6 +10,7 @@ | |||
"main": "index.js", | |||
"scripts": { | |||
"build-typography-test": "node index.js tokens.json temp/typography.json base/options,base/sizing,core/typography base/options,base/sizing", | |||
"build-composition-test": "node index.js tokens.json temp/composition.json base/options,base/sizing,core/composition base/options,base/sizing", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"build-composition-test": "node index.js tokens.json temp/composition.json base/options,base/sizing,core/composition base/options,base/sizing", | |
"build-composition-test": "node index.js tokens.json temp/composition.json base/options,base/sizing,core/composition base/options,base/sizing --expandComposition=true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be enabled to be run
No description provided.