@rebuildjs/tailwindcss 0.8.2 → 0.8.3

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,68 +1,67 @@
1
1
  {
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
2
+ "name": "@rebuildjs/tailwindcss",
3
+ "version": "0.8.3",
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.1",
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
+ }
68
67
  }
@@ -145,18 +145,6 @@ export function rebuild_tailwind_plugin_(config) {
145
145
  basename(output__relative_path, '.js')
146
146
  .split('-')
147
147
  .slice(-1)[0]
148
- metafile_updated = !cssBundle.includes('_' + output_hash)
149
- const annotated_cssBundle =
150
- metafile_updated
151
- ? cssBundle__annotate(cssBundle, '_' + output_hash)
152
- : cssBundle
153
- output.cssBundle = annotated_cssBundle
154
- if (metafile_updated) {
155
- metafile.outputs[annotated_cssBundle] = metafile.outputs[cssBundle]
156
- metafile.outputs[annotated_cssBundle + '.map'] = metafile.outputs[cssBundle + '.map']
157
- }
158
- const annotated_cssBundle_path = join(cwd_(app_ctx), annotated_cssBundle)
159
- const annotated_cssBundle_map_path = join(cwd_(app_ctx), annotated_cssBundle) + '.map'
160
148
  const tailwind_instance = tailwind({
161
149
  ...config?.tailwindcss_config,
162
150
  content: [
@@ -181,6 +169,13 @@ export function rebuild_tailwind_plugin_(config) {
181
169
  }
182
170
  : false,
183
171
  })))
172
+ metafile_updated = !cssBundle.includes('_' + output_hash)
173
+ const annotated_cssBundle =
174
+ metafile_updated
175
+ ? cssBundle__annotate(cssBundle, '_' + output_hash)
176
+ : cssBundle
177
+ const annotated_cssBundle_path = join(cwd_(app_ctx), annotated_cssBundle)
178
+ const annotated_cssBundle_map_path = join(cwd_(app_ctx), annotated_cssBundle) + '.map'
184
179
  await cmd(writeFile(annotated_cssBundle_path, result.css))
185
180
  const map_json = result.map ? JSON.stringify(result.map) : null
186
181
  if (map_json) {
@@ -194,6 +189,11 @@ export function rebuild_tailwind_plugin_(config) {
194
189
  cmd(readFile(annotated_cssBundle_path))
195
190
  .then(buf=>'' + buf === result.css),
196
191
  5_000)
192
+ output.cssBundle = annotated_cssBundle
193
+ if (metafile_updated) {
194
+ metafile.outputs[annotated_cssBundle] = metafile.outputs[cssBundle]
195
+ metafile.outputs[annotated_cssBundle + '.map'] = metafile.outputs[cssBundle + '.map']
196
+ }
197
197
  return metafile_updated
198
198
  }
199
199
  async function file_json__parse__wait(path) {