Skip to content

Commit cd18fdf

Browse files
committed
test: pin tailwind source scans in demos
1 parent 78d3c7e commit cd18fdf

12 files changed

Lines changed: 79 additions & 89 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "./**/*.{ts,tsx,jsx,js,html}";
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "./**/*.{ts,tsx,jsx,js,html}";
23
@source not "dist";

demo/taro-vite-tailwindcss-v5/src/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
22
@source "./pages/**/*.{ts,tsx,jsx,js}";
33

44
@theme {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "./**/*.{ts,tsx,jsx,js,html}";
23
@source not "dist";

demo/uni-app-tailwindcss-v4/src/main.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* stylelint-disable custom-property-pattern */
2-
@import "tailwindcss";
2+
@import "tailwindcss" source(none);
33
@config "../tailwind.config.js";
4+
@source "./**/*.{vue,js,ts,jsx,tsx,html}";
45
@source not "../src/uni_modules";
56

67
@theme {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "./**/*.{vue,js,ts,jsx,tsx,html}";
23
@source not "dist";
34
@source not "../src/uni_modules";

e2e/__snapshots__/apps-generator-mode/compare/report.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6559,7 +6559,7 @@
65596559
],
65606560
"status": "passed",
65616561
"legacy": {
6562-
"bytes": 53207,
6562+
"bytes": 52812,
65636563
"selectors": [
65646564
".active_cbg-emerald-50:active",
65656565
".active_cbg-emerald-600:active",
@@ -6925,8 +6925,8 @@
69256925
"hasWeappEscapedArbitrarySelector": true,
69266926
"hasRawArbitrarySelector": false
69276927
},
6928-
"deltaBytes": -3518,
6929-
"generatorBytesRatio": 0.9339,
6928+
"deltaBytes": -3123,
6929+
"generatorBytesRatio": 0.9409,
69306930
"sharedSelectors": [
69316931
".active_cbg-emerald-50:active",
69326932
".active_cbg-emerald-600:active",
@@ -12294,7 +12294,7 @@
1229412294
],
1229512295
"status": "passed",
1229612296
"legacy": {
12297-
"bytes": 2082,
12297+
"bytes": 2050,
1229812298
"selectors": [
1229912299
".bg-_b_h123456_B",
1230012300
".bg-gradient-to-r",
@@ -12303,7 +12303,6 @@
1230312303
".from-cyan-500",
1230412304
".h-14",
1230512305
".h-_b300px_B",
12306-
".static",
1230712306
".text-_b55rpx_B",
1230812307
".text-_b_hc31d6b_B",
1230912308
".text-_b_hfff_B",
@@ -12364,8 +12363,8 @@
1236412363
"hasWeappEscapedArbitrarySelector": true,
1236512364
"hasRawArbitrarySelector": false
1236612365
},
12367-
"deltaBytes": 3452,
12368-
"generatorBytesRatio": 2.658,
12366+
"deltaBytes": 3484,
12367+
"generatorBytesRatio": 2.6995,
1236912368
"sharedSelectors": [
1237012369
".bg-_b_h123456_B",
1237112370
".bg-gradient-to-r",
@@ -12374,7 +12373,6 @@
1237412373
".from-cyan-500",
1237512374
".h-14",
1237612375
".h-_b300px_B",
12377-
".static",
1237812376
".text-_b55rpx_B",
1237912377
".text-_b_hc31d6b_B",
1238012378
".text-_b_hfff_B",
@@ -12399,6 +12397,7 @@
1239912397
".inline",
1240012398
".outline",
1240112399
".resize",
12400+
".static",
1240212401
".table",
1240312402
".transform",
1240412403
".transition",
@@ -12417,7 +12416,7 @@
1241712416
],
1241812417
"status": "passed",
1241912418
"legacy": {
12420-
"bytes": 4505,
12419+
"bytes": 4473,
1242112420
"selectors": [
1242212421
"._eborder-brand",
1242312422
".active_cbg-emerald-600:active",
@@ -12443,7 +12442,6 @@
1244312442
".space-y-4 > text + view",
1244412443
".space-y-4 > view + text",
1244512444
".space-y-4 > view + view",
12446-
".static",
1244712445
".text-_b32rpx_B",
1244812446
".text-_b55rpx_B",
1244912447
".text-_b_hc31d6b_B",
@@ -12642,8 +12640,8 @@
1264212640
"hasWeappEscapedArbitrarySelector": true,
1264312641
"hasRawArbitrarySelector": false
1264412642
},
12645-
"deltaBytes": 19259,
12646-
"generatorBytesRatio": 5.275,
12643+
"deltaBytes": 19291,
12644+
"generatorBytesRatio": 5.3128,
1264712645
"sharedSelectors": [
1264812646
"._eborder-brand",
1264912647
".active_cbg-emerald-600:active",

e2e/__snapshots__/apps-generator-mode/compare/report.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ This report is generated by `pnpm e2e:apps-generator`. It compares each demo app
99
| vite-native | apps | passed | `vite-native/dist/app.wxss` (+2) | 5751 | 7722 | +1971 | 1.3427 | none | no | no | no |
1010
| vite-native-ts | apps | passed | `vite-native-ts/dist/app.wxss` (+3) | 12443 | 24236 | +11793 | 1.9478 | none | no | no | no |
1111
| uni-app-vue3-vite | demo | passed | `uni-app-vue3-vite/dist/build/mp-weixin/app.wxss` (+10) | 401919 | 502633 | +100714 | 1.2506 | none | no | no | no |
12-
| uni-app-tailwindcss-v4 | demo | passed | `uni-app-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+2) | 53207 | 49689 | -3518 | 0.9339 | none | no | no | no |
12+
| uni-app-tailwindcss-v4 | demo | passed | `uni-app-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+2) | 52812 | 49689 | -3123 | 0.9409 | none | no | no | no |
1313
| uni-app-tailwindcss-v5 | demo | passed | `uni-app-tailwindcss-v5/dist/build/mp-weixin/app.wxss` (+2) | 61948 | 54109 | -7839 | 0.8735 | none | no | no | no |
1414
| taro-app | demo | passed | `taro-app/dist/app.wxss` (+5) | 40513 | 65762 | +25249 | 1.6232 | none | no | no | no |
1515
| taro-webpack-tailwindcss-v4 | demo | passed | `taro-webpack-tailwindcss-v4/dist/app.wxss` (+1) | 382159 | 366436 | -15723 | 0.9589 | none | no | no | no |
1616
| taro-app-vite | demo | passed | `taro-app-vite/dist/app.wxss` (+2) | 4530 | 4701 | +171 | 1.0377 | none | no | no | no |
17-
| taro-vite-tailwindcss-v4 | demo | passed | `taro-vite-tailwindcss-v4/dist/app.wxss` (+2) | 2082 | 5534 | +3452 | 2.658 | none | no | no | no |
18-
| taro-vite-tailwindcss-v5 | demo | passed | `taro-vite-tailwindcss-v5/dist/app.wxss` (+2) | 4505 | 23764 | +19259 | 5.275 | none | no | no | no |
17+
| taro-vite-tailwindcss-v4 | demo | passed | `taro-vite-tailwindcss-v4/dist/app.wxss` (+2) | 2050 | 5534 | +3484 | 2.6995 | none | no | no | no |
18+
| taro-vite-tailwindcss-v5 | demo | passed | `taro-vite-tailwindcss-v5/dist/app.wxss` (+2) | 4473 | 23764 | +19291 | 5.3128 | none | no | no | no |
1919
| taro-vue3-app | demo | passed | `taro-vue3-app/dist/app.wxss` (+1) | 115828 | 123826 | +7998 | 1.0691 | none | no | no | no |
2020
| gulp-app | demo | passed | `gulp-app/dist/app.wxss` (+2) | 6578 | 6496 | -82 | 0.9875 | none | no | no | no |
2121
| mpx-app | demo | passed | `mpx-app/dist/wx/app.wxss` (+23) | 189931 | 199251 | +9320 | 1.0491 | none | no | no | no |
@@ -96,8 +96,8 @@ This report is generated by `pnpm e2e:apps-generator`. It compares each demo app
9696
### taro-vite-tailwindcss-v4
9797

9898
- CSS files: `app.wxss`, `app-origin.wxss`, `index.wxss`
99-
- Shared selectors: `.bg-_b_h123456_B`, `.bg-gradient-to-r`, `.bg-linear-to-r`, `.bg-purple-300`, `.from-cyan-500`, `.h-14`, `.h-_b300px_B`, `.static`, `.text-_b55rpx_B`, `.text-_b_hc31d6b_B`, `.text-_b_hfff_B`, `.to-blue-500`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
100-
- Generator only: `.block`, `.blur`, `.border`, `.container`, `.ease-out`, `.filter`, `.fixed`, `.flex`, `.grid`, `.hidden`, `.inline`, `.outline`, `.resize`, `.table`, `.transform`, `.transition`, `.visible`
99+
- Shared selectors: `.bg-_b_h123456_B`, `.bg-gradient-to-r`, `.bg-linear-to-r`, `.bg-purple-300`, `.from-cyan-500`, `.h-14`, `.h-_b300px_B`, `.text-_b55rpx_B`, `.text-_b_hc31d6b_B`, `.text-_b_hfff_B`, `.to-blue-500`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
100+
- Generator only: `.block`, `.blur`, `.border`, `.container`, `.ease-out`, `.filter`, `.fixed`, `.flex`, `.grid`, `.hidden`, `.inline`, `.outline`, `.resize`, `.static`, `.table`, `.transform`, `.transition`, `.visible`
101101
- Legacy only: -
102102

103103
### taro-vite-tailwindcss-v5

e2e/__snapshots__/apps-generator-mode/compare/report.zh-CN.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
| vite-native | apps | 通过 | `vite-native/dist/app.wxss` (+2) | 5751 | 7722 | +1971 | 1.3427 |||||
1010
| vite-native-ts | apps | 通过 | `vite-native-ts/dist/app.wxss` (+3) | 12443 | 24236 | +11793 | 1.9478 |||||
1111
| uni-app-vue3-vite | demo | 通过 | `uni-app-vue3-vite/dist/build/mp-weixin/app.wxss` (+10) | 401919 | 502633 | +100714 | 1.2506 |||||
12-
| uni-app-tailwindcss-v4 | demo | 通过 | `uni-app-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+2) | 53207 | 49689 | -3518 | 0.9339 |||||
12+
| uni-app-tailwindcss-v4 | demo | 通过 | `uni-app-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+2) | 52812 | 49689 | -3123 | 0.9409 |||||
1313
| uni-app-tailwindcss-v5 | demo | 通过 | `uni-app-tailwindcss-v5/dist/build/mp-weixin/app.wxss` (+2) | 61948 | 54109 | -7839 | 0.8735 |||||
1414
| taro-app | demo | 通过 | `taro-app/dist/app.wxss` (+5) | 40513 | 65762 | +25249 | 1.6232 |||||
1515
| taro-webpack-tailwindcss-v4 | demo | 通过 | `taro-webpack-tailwindcss-v4/dist/app.wxss` (+1) | 382159 | 366436 | -15723 | 0.9589 |||||
1616
| taro-app-vite | demo | 通过 | `taro-app-vite/dist/app.wxss` (+2) | 4530 | 4701 | +171 | 1.0377 |||||
17-
| taro-vite-tailwindcss-v4 | demo | 通过 | `taro-vite-tailwindcss-v4/dist/app.wxss` (+2) | 2082 | 5534 | +3452 | 2.658 |||||
18-
| taro-vite-tailwindcss-v5 | demo | 通过 | `taro-vite-tailwindcss-v5/dist/app.wxss` (+2) | 4505 | 23764 | +19259 | 5.275 |||||
17+
| taro-vite-tailwindcss-v4 | demo | 通过 | `taro-vite-tailwindcss-v4/dist/app.wxss` (+2) | 2050 | 5534 | +3484 | 2.6995 |||||
18+
| taro-vite-tailwindcss-v5 | demo | 通过 | `taro-vite-tailwindcss-v5/dist/app.wxss` (+2) | 4473 | 23764 | +19291 | 5.3128 |||||
1919
| taro-vue3-app | demo | 通过 | `taro-vue3-app/dist/app.wxss` (+1) | 115828 | 123826 | +7998 | 1.0691 |||||
2020
| gulp-app | demo | 通过 | `gulp-app/dist/app.wxss` (+2) | 6578 | 6496 | -82 | 0.9875 |||||
2121
| mpx-app | demo | 通过 | `mpx-app/dist/wx/app.wxss` (+23) | 189931 | 199251 | +9320 | 1.0491 |||||
@@ -96,8 +96,8 @@
9696
### taro-vite-tailwindcss-v4
9797

9898
- CSS 文件:`app.wxss`, `app-origin.wxss`, `index.wxss`
99-
- 两边共有:`.bg-_b_h123456_B`, `.bg-gradient-to-r`, `.bg-linear-to-r`, `.bg-purple-300`, `.from-cyan-500`, `.h-14`, `.h-_b300px_B`, `.static`, `.text-_b55rpx_B`, `.text-_b_hc31d6b_B`, `.text-_b_hfff_B`, `.to-blue-500`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
100-
- 仅生成模式:`.block`, `.blur`, `.border`, `.container`, `.ease-out`, `.filter`, `.fixed`, `.flex`, `.grid`, `.hidden`, `.inline`, `.outline`, `.resize`, `.table`, `.transform`, `.transition`, `.visible`
99+
- 两边共有:`.bg-_b_h123456_B`, `.bg-gradient-to-r`, `.bg-linear-to-r`, `.bg-purple-300`, `.from-cyan-500`, `.h-14`, `.h-_b300px_B`, `.text-_b55rpx_B`, `.text-_b_hc31d6b_B`, `.text-_b_hfff_B`, `.to-blue-500`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
100+
- 仅生成模式:`.block`, `.blur`, `.border`, `.container`, `.ease-out`, `.filter`, `.fixed`, `.flex`, `.grid`, `.hidden`, `.inline`, `.outline`, `.resize`, `.static`, `.table`, `.transform`, `.transition`, `.visible`
101101
- 仅旧链路:-
102102

103103
### taro-vite-tailwindcss-v5

e2e/__snapshots__/apps-generator-mode/css-output/taro-vite-tailwindcss-v4.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Generator CSS files: app.wxss, app-origin.wxss, index.wxss
77

88
| Mode | Bytes | Selectors | @supports | :hover | Tailwind banner | Raw arbitrary selector | Weapp escaped arbitrary selector |
99
| --- | ---: | ---: | --- | --- | --- | --- | --- |
10-
| legacy | 2082 | 17 | false | false | false | false | true |
10+
| legacy | 2050 | 16 | false | false | false | false | true |
1111
| generator | 5534 | 34 | false | false | false | false | true |
1212

1313
## Diff
@@ -37,7 +37,7 @@ Generator CSS files: app.wxss, app-origin.wxss, index.wxss
3737
--tw-gradient-position: initial;
3838
--tw-gradient-from: rgba(0, 0, 0, 0);
3939
--tw-gradient-via: rgba(0, 0, 0, 0);
40-
@@ -17,44 +23,112 @@
40+
@@ -17,41 +23,112 @@
4141
--tw-gradient-from-position: 0%;
4242
--tw-gradient-via-position: 50%;
4343
--tw-gradient-to-position: 100%;
@@ -93,9 +93,9 @@ Generator CSS files: app.wxss, app-origin.wxss, index.wxss
9393
+.fixed {
9494
+ position: fixed;
9595
+}
96-
.static {
97-
position: static;
98-
}
96+
+.static {
97+
+ position: static;
98+
+}
9999
+.container {
100100
+ width: 100%;
101101
+}
@@ -169,7 +169,7 @@ Generator CSS files: app.wxss, app-origin.wxss, index.wxss
169169
background-color: var(--color-purple-300);
170170
}
171171
.bg-linear-to-r {
172-
@@ -85,15 +159,64 @@
172+
@@ -82,15 +159,64 @@
173173
var(--tw-gradient-to) var(--tw-gradient-to-position)
174174
);
175175
}
@@ -284,9 +284,6 @@ text,
284284
margin: 0;
285285
padding: 0;
286286
}
287-
.static {
288-
position: static;
289-
}
290287
.h-14 {
291288
height: 112rpx;
292289
height: calc(var(--spacing) * 14);

0 commit comments

Comments
 (0)