Commit 0e61002
committed
ensure we re-print the candidate in case it didn't change
When printing a candidate, we do some optimizations already, such as:
- `bg-[var(--foo)]` -> `bg-(--foo)`
- `bg-[rgb(0,_0,_0)]` -> `bg-[rgb(0,0,0)]`
Consistency in your project will reduce the file size.
We parse and reprint the candidate if nothing changed during migrations
because we don't have dedicated migrations for them.
So (a lot) of these classes weren't fully updated to the v4 flavor of
the classes.
Luckily re-parsing the candidate is fast because we are re-using the
design system which means that we have a cached version of the
candidate.1 parent ba4cab7 commit 0e61002
File tree
1 file changed
+15
-1
lines changed- packages/@tailwindcss-upgrade/src/codemods/template
1 file changed
+15
-1
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
| |||
0 commit comments