You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to use outputReferences: true for Sass targets while generating several files (mapping ouput to input), and I'm looking for advice about how to manage dependencies.
I would like to be able to have one single @use "tokens/components/button"; in a project button's Sass code, and not need to add multiple @use manually for all other tokens/**/*.scss Sass files this one depends on.
So I would like to have these @use — only the ones that are needed — automatically put into tokens/components/_button.scss at build time.
Is anyone already working like that, or having advice about how best to do it?
The text was updated successfully, but these errors were encountered:
I can kind of see how it could be done in a custom format... What you would do is in the custom format,
Iterate over all tokens (should be filtered in the config by filePath so only button tokens are in a buttons.scss file)
If the token has a reference, get the referenced token and that token should have a filePath attribute. Save that in an array to later build all the @use imports at the top of the file. You'll need to modify the filePath in a way that matches how you are building the other files
Hello, I'm trying to use
outputReferences: true
for Sass targets while generating several files (mapping ouput to input), and I'm looking for advice about how to manage dependencies.I would like to be able to have one single
@use "tokens/components/button";
in a project button's Sass code, and not need to add multiple@use
manually for all othertokens/**/*.scss
Sass files this one depends on.So I would like to have these
@use
— only the ones that are needed — automatically put intotokens/components/_button.scss
at build time.Is anyone already working like that, or having advice about how best to do it?
The text was updated successfully, but these errors were encountered: