@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 CHANGED
@@ -1,67 +1,68 @@
1
1
  {
2
- "name": "@rebuildjs/tailwindcss",
3
- "version": "0.8.0",
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
- "dependencies": {
38
- "ctx-core": "^5.38.1",
39
- "esbuild": "^0.20.0",
40
- "postcss": "^8.4.34",
41
- "rebuildjs": "^0.56.0",
42
- "tailwindcss": "^3.4.1"
43
- },
44
- "devDependencies": {
45
- "c8": "^9.1.0",
46
- "check-dts": "^0.7.2",
47
- "esmock": "^2.6.3",
48
- "relementjs": "^0.64.2",
49
- "tsx": "^4.7.0",
50
- "typescript": "next",
51
- "uvu": "^0.5.6"
52
- },
53
- "publishConfig": {
54
- "access": "public",
55
- "cache": "~/.npm"
56
- },
57
- "sideEffects": false,
58
- "scripts": {
59
- "build": ":",
60
- "clean": ":",
61
- "exec": "$@",
62
- "test": "pnpm test:unit && pnpm test:types",
63
- "test:types": "check-dts",
64
- "test:unit": "NODE_OPTIONS=--loader=esmock tsx node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
65
- "test:unit:coverage": "c8 pnpm test:unit"
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 cmd(
169
- postcss(
170
- config?.postcss_plugin_a1_?.(tailwind_instance)
171
- ?? [tailwind_instance]
172
- ).process(
173
- await cmd(readFile(esbuild_cssBundle_path)),
174
- {
175
- from: esbuild_cssBundle_path,
176
- to: join(cwd_(app_ctx), cssBundle),
177
- map: esbuild_cssBundle_map_exists
178
- ? {
179
- prev: await file_json__parse__wait(esbuild_cssBundle_map_path)
180
- }
181
- : false,
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 cmd(file_exists__waitfor(()=>
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 cmd(file_exists__waitfor(()=>
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) {