@rebuildjs/tailwindcss 0.8.0 → 0.8.2
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 +66 -65
- package/rebuild_tailwind_plugin/index.js +22 -21
package/package.json
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
2
|
+
"name": "@rebuildjs/tailwindcss",
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"description": "Tailwindcss integration with rebuildjs",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tailwindcss",
|
|
7
|
+
"reactive",
|
|
8
|
+
"multi page apps",
|
|
9
|
+
"web app",
|
|
10
|
+
"web server",
|
|
11
|
+
"esbuild",
|
|
12
|
+
"rmemo",
|
|
13
|
+
"ctx-core"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/rebuildjs/tailwindcss#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/rebuildjs/tailwindcss/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/rebuildjs/tailwindcss.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
|
+
"author": "Brian Takita",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"*.d.ts",
|
|
28
|
+
"*.js",
|
|
29
|
+
"*.json",
|
|
30
|
+
"rebuild_tailwind_plugin"
|
|
31
|
+
],
|
|
32
|
+
"types": "./index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": "./index.js",
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": ":",
|
|
39
|
+
"clean": ":",
|
|
40
|
+
"exec": "$@",
|
|
41
|
+
"prepublishOnly": "pnpm clean && pnpm build && pnpm test",
|
|
42
|
+
"test": "pnpm test:unit && pnpm test:types",
|
|
43
|
+
"test:types": "check-dts",
|
|
44
|
+
"test:unit": "NODE_OPTIONS=--loader=esmock tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
|
|
45
|
+
"test:unit:coverage": "c8 pnpm test:unit"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"ctx-core": "^5.38.1",
|
|
49
|
+
"esbuild": "^0.20.0",
|
|
50
|
+
"postcss": "^8.4.34",
|
|
51
|
+
"rebuildjs": "^0.56.0",
|
|
52
|
+
"tailwindcss": "^3.4.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"c8": "^9.1.0",
|
|
56
|
+
"check-dts": "^0.7.2",
|
|
57
|
+
"esmock": "^2.6.3",
|
|
58
|
+
"relementjs": "^0.64.2",
|
|
59
|
+
"tsx": "^4.7.0",
|
|
60
|
+
"typescript": "next",
|
|
61
|
+
"uvu": "^0.5.6"
|
|
62
|
+
},
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public",
|
|
65
|
+
"cache": "~/.npm"
|
|
66
|
+
},
|
|
67
|
+
"sideEffects": false
|
|
67
68
|
}
|
|
@@ -165,34 +165,35 @@ export function rebuild_tailwind_plugin_(config) {
|
|
|
165
165
|
...(config?.content ?? [])
|
|
166
166
|
]
|
|
167
167
|
})
|
|
168
|
-
const result = await
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
168
|
+
const result = await file_exists__waitfor(
|
|
169
|
+
async ()=>cmd(
|
|
170
|
+
postcss(
|
|
171
|
+
config?.postcss_plugin_a1_?.(tailwind_instance)
|
|
172
|
+
?? [tailwind_instance]
|
|
173
|
+
).process(
|
|
174
|
+
await readFile(esbuild_cssBundle_path),
|
|
175
|
+
{
|
|
176
|
+
from: esbuild_cssBundle_path,
|
|
177
|
+
to: join(cwd_(app_ctx), cssBundle),
|
|
178
|
+
map: esbuild_cssBundle_map_exists
|
|
179
|
+
? {
|
|
180
|
+
prev: await file_json__parse__wait(esbuild_cssBundle_map_path)
|
|
181
|
+
}
|
|
182
|
+
: false,
|
|
183
|
+
})))
|
|
183
184
|
await cmd(writeFile(annotated_cssBundle_path, result.css))
|
|
184
185
|
const map_json = result.map ? JSON.stringify(result.map) : null
|
|
185
186
|
if (map_json) {
|
|
186
187
|
await cmd(writeFile(annotated_cssBundle_map_path, map_json))
|
|
187
|
-
await
|
|
188
|
-
readFile(annotated_cssBundle_map_path)
|
|
188
|
+
await file_exists__waitfor(()=>
|
|
189
|
+
cmd(readFile(annotated_cssBundle_map_path))
|
|
189
190
|
.then(buf=>'' + buf === map_json),
|
|
190
|
-
5_000)
|
|
191
|
+
5_000)
|
|
191
192
|
}
|
|
192
|
-
await
|
|
193
|
-
readFile(annotated_cssBundle_path)
|
|
193
|
+
await file_exists__waitfor(()=>
|
|
194
|
+
cmd(readFile(annotated_cssBundle_path))
|
|
194
195
|
.then(buf=>'' + buf === result.css),
|
|
195
|
-
5_000)
|
|
196
|
+
5_000)
|
|
196
197
|
return metafile_updated
|
|
197
198
|
}
|
|
198
199
|
async function file_json__parse__wait(path) {
|