-
Notifications
You must be signed in to change notification settings - Fork 43
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
WIP: script to create a property-variable map for autocomplete & stylelint #664
base: main
Are you sure you want to change the base?
Conversation
|
Variables changedNo variables changed |
Hey @siddharthkp to make the figma token plugin work, I am adding scopes to tokens: https://github.com/primer/primitives/pull/665/files#diff-a22f7c98b98666dfd7ade4b02294caee8eef00a58a4c80b0584f845ec3383d2eR10 I need specific scopes but I am sure we could work something out that works for both cases. Any additional meta data should be added into the I currently nest my stuff into a This is what I currently use:
The scopes I have are: all: ['ALL_SCOPES'],
radius: ['CORNER_RADIUS'],
size: ['WIDTH_HEIGHT'],
gap: ['GAP'],
bgColor: ['FRAME_FILL', 'SHAPE_FILL'],
fgColor: ['TEXT_FILL'],
borderColor: ['STROKE'], I will need to be able to keep up the mapping in a way so that the output stays the same, but we can add more granular scopes, e.g. |
Ooooh, that seems like the one!
That would be perfect! |
I'd suggest we start in another extension key, something like "org.primer.vscode", and then we can merge them once we have confidence in the output? Don't want to come in your way with my experimental gibberish 😅 |
Great idea. 👍 |
Update path from `tokens-next-private` to `dist`
e1c1c2d
to
ff00edd
Compare
// const unusedVariables = logUnassignedVariables() | ||
|
||
// if (unusedVariables.length > 0) { | ||
// // eslint-disable-next-line no-console | ||
// console.log(`Found unused variables, failing build`) | ||
// // eslint-disable-next-line no-console | ||
// console.log(unusedVariables) | ||
// process.exit(1) | ||
// } |
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.
As discussed, I disabled this temporarily until work continues.
ff00edd
to
c6ae056
Compare
(Do not merge, see demo in https://github.com/github/primer/issues/2008#issuecomment-1604286039)
This is a first draft, the implementation is based on running filter functions on generated variables (
tokens-next-private/**/*.css
Example:
generated output:
see full file
I'd like to explore adding property information to each token and treating intellisense as a
platform
as an alternative for this scriptexample: