-
-
Notifications
You must be signed in to change notification settings - Fork 34
PoC: CSS extraction #560
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
Draft
davesnx
wants to merge
104
commits into
main
Choose a base branch
from
start-extraction
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
PoC: CSS extraction #560
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…messages Previously, type errors in generated code would show '_none_, line 1' which provided no useful debugging information. This commit ensures that all generated AST nodes have proper location information that traces back to the original source location. Changes: - Fixed location propagation in CSS module identifier generation - Improved render_variable to preserve location information - Enhanced addLabel to include location in all generated expressions - Ensured render_make_call maintains proper location attributes Now type errors show actual file names and line numbers (e.g., 'test_styles.ml, lines 78-88') instead of unhelpful '_none_' locations.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
New nightly version has been published to the NPM registry: @davesnx/[email protected]. |
b05aeb5 to
313e9ab
Compare
8f09ed7 to
467d0b6
Compare
7486be0 to
86b0b7e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements CSS extraction discussed here #433
styled-ppx is now able to generate static CSS files. It runs on top of dune rules, and the invokation is
styled-ppx.generateNote: For ReScript users, we should use generators or call the invokation on the build system or make styled-ppx itself generate the files. I dunno about the design yet, but I'm a bit worried since there are a few problems for ReScript #415, for now I will prio Melange/native since I can battle-test it.
Fixes #516
Since we use
glob_files_rec <glob>we solved the "one shot" stylesheets from native #516.Users can run the
styled-ppx.generateaction at any location they choose, watching any part of the codebase they prefer and eliminating the problem of including all styles into one big Stylesheet for native.Improves error messages by a lot and fixes some locations #429
Starts with the first stone of unifying both lexers #432
A bit of an unrelated, but merged into this branch #561
We will use a single lexer for parsing both the stylesheet and the properties, and also type-check properties. Future work will be to join both libraries and remove a bit of glue code.