@rebuildjs/tailwindcss 0.8.26 → 0.8.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/rebuild_tailwind_plugin/index.js +22 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuildjs/tailwindcss",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.30",
|
|
4
4
|
"description": "Tailwindcss integration with rebuildjs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tailwindcss",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"./package.json": "./package.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"ctx-core": "^6.1.
|
|
38
|
+
"ctx-core": "^6.1.3",
|
|
39
39
|
"esbuild": "^0.20.0",
|
|
40
40
|
"postcss": "^8.4.35",
|
|
41
|
-
"rebuildjs": "^0.60.
|
|
41
|
+
"rebuildjs": "^0.60.4",
|
|
42
42
|
"tailwindcss": "^3.4.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"c8": "^9.1.0",
|
|
46
46
|
"check-dts": "^0.7.2",
|
|
47
47
|
"esmock": "^2.6.3",
|
|
48
|
-
"relementjs": "^0.71.
|
|
48
|
+
"relementjs": "^0.71.11",
|
|
49
49
|
"tsx": "^4.7.1",
|
|
50
50
|
"typescript": "next",
|
|
51
51
|
"uvu": "^0.5.6"
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
cssBundle__annotate,
|
|
26
26
|
cwd_,
|
|
27
27
|
rebuildjs__esbuild__build_id_,
|
|
28
|
-
rebuildjs__ready__add,
|
|
29
28
|
rebuildjs__esbuild__done_,
|
|
30
29
|
rebuildjs__esbuild__done__wait,
|
|
30
|
+
rebuildjs__ready__add,
|
|
31
31
|
server__metafile_,
|
|
32
32
|
server__metafile__update,
|
|
33
33
|
server__output_,
|
|
@@ -79,8 +79,9 @@ export function rebuild_tailwind_plugin_(config) {
|
|
|
79
79
|
setup.tailwind__build$ = tailwind__build$_()
|
|
80
80
|
return setup
|
|
81
81
|
function tailwind__build$_() {
|
|
82
|
-
return be(app_ctx, app_ctx=>
|
|
83
|
-
|
|
82
|
+
return be(app_ctx, app_ctx=>{
|
|
83
|
+
let update_promise
|
|
84
|
+
return run(memo_(tailwind__build$=>{
|
|
84
85
|
r()
|
|
85
86
|
return tailwind__build$
|
|
86
87
|
function r() {
|
|
@@ -96,25 +97,31 @@ export function rebuild_tailwind_plugin_(config) {
|
|
|
96
97
|
)=>{
|
|
97
98
|
try {
|
|
98
99
|
let server__metafile_updated
|
|
99
|
-
let
|
|
100
|
-
await
|
|
100
|
+
let browser__metafile_updated
|
|
101
|
+
await update_promise
|
|
102
|
+
await cmd(rebuildjs__esbuild__done__wait())
|
|
103
|
+
const _server__metafile = server__metafile_(app_ctx)
|
|
104
|
+
const _browser__metafile = browser__metafile_(app_ctx)
|
|
101
105
|
for (const middleware_ctx of server__output__relative_path_M_middleware_ctx.values()) {
|
|
102
|
-
server__metafile_updated
|
|
103
|
-
|
|
106
|
+
server__metafile_updated ||= await output__process(
|
|
107
|
+
_server__metafile,
|
|
104
108
|
server__output__relative_path_(middleware_ctx),
|
|
105
109
|
server__output_(middleware_ctx))
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
browser__metafile_updated ||= await output__process(
|
|
111
|
+
_browser__metafile,
|
|
108
112
|
browser__output__relative_path_(middleware_ctx),
|
|
109
113
|
browser__output_(middleware_ctx))
|
|
110
114
|
}
|
|
115
|
+
let update_promise_a1 = []
|
|
111
116
|
if (server__metafile_updated) {
|
|
112
|
-
|
|
117
|
+
update_promise_a1.push(server__metafile__update(_server__metafile))
|
|
113
118
|
}
|
|
114
|
-
if (
|
|
115
|
-
|
|
119
|
+
if (browser__metafile_updated) {
|
|
120
|
+
update_promise_a1.push(browser__metafile__update(_browser__metafile))
|
|
116
121
|
}
|
|
117
|
-
if (
|
|
122
|
+
if (update_promise_a1.length) {
|
|
123
|
+
update_promise = Promise.all(update_promise_a1)
|
|
124
|
+
} else {
|
|
118
125
|
rebuild_tailwind_plugin__build_id__set(app_ctx, build_id)
|
|
119
126
|
}
|
|
120
127
|
} catch (err) {
|
|
@@ -225,7 +232,8 @@ export function rebuild_tailwind_plugin_(config) {
|
|
|
225
232
|
}
|
|
226
233
|
})
|
|
227
234
|
}
|
|
228
|
-
}))
|
|
235
|
+
}))
|
|
236
|
+
}, { id: 'tailwind__build$', ns: 'app' })
|
|
229
237
|
}
|
|
230
238
|
}
|
|
231
239
|
}
|