Skip to content
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

Improve multi-root @config linking #15001

Draft
wants to merge 11 commits into
base: next
Choose a base branch
from

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Nov 14, 2024

This PR improves the codemod when dealing with multi-root CSS files.

Test plan:

Running this on Tailwind UI's codebase it looks like this:

image

@RobinMalfait RobinMalfait force-pushed the fix/improve-multi-root-without-at-config branch from 7dc9df5 to 9679088 Compare November 14, 2024 17:24
1. Sort by depth first
2. Sort by alphabetical folders
3. Prefer files starting with `index`
4. Sort alphabetically

Before this change, when comparing two files, if they both started with
`index`, then the sort was non-deterministic.
This ensures that the closest config file for a stylesheet is linked. We
also write some information to the user so they can verify that the
paths are correct (and adjust if necessary).
We are dealing with some paths...
@RobinMalfait RobinMalfait force-pushed the fix/improve-multi-root-without-at-config branch from 9679088 to 958c58e Compare November 14, 2024 21:22
@RobinMalfait RobinMalfait force-pushed the fix/improve-multi-root-without-at-config branch from 6ffd59a to 5e447be Compare November 14, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant