@rebuildjs/tailwindcss 0.8.1 → 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebuildjs/tailwindcss",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Tailwindcss integration with rebuildjs",
5
5
  "keywords": [
6
6
  "tailwindcss",
@@ -165,35 +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 file_exists__waitfor(()=>
174
- cmd(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
- }))
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
+ })))
184
184
  await cmd(writeFile(annotated_cssBundle_path, result.css))
185
185
  const map_json = result.map ? JSON.stringify(result.map) : null
186
186
  if (map_json) {
187
187
  await cmd(writeFile(annotated_cssBundle_map_path, map_json))
188
- await cmd(file_exists__waitfor(()=>
189
- readFile(annotated_cssBundle_map_path)
188
+ await file_exists__waitfor(()=>
189
+ cmd(readFile(annotated_cssBundle_map_path))
190
190
  .then(buf=>'' + buf === map_json),
191
- 5_000))
191
+ 5_000)
192
192
  }
193
- await cmd(file_exists__waitfor(()=>
194
- readFile(annotated_cssBundle_path)
193
+ await file_exists__waitfor(()=>
194
+ cmd(readFile(annotated_cssBundle_path))
195
195
  .then(buf=>'' + buf === result.css),
196
- 5_000))
196
+ 5_000)
197
197
  return metafile_updated
198
198
  }
199
199
  async function file_json__parse__wait(path) {