@rebuildjs/tailwindcss 0.1.62 → 0.2.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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuildjs/tailwindcss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.3",
|
|
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": "^5.
|
|
38
|
+
"ctx-core": "^5.28.1",
|
|
39
39
|
"esbuild": "^0.19.12",
|
|
40
40
|
"postcss": "^8.4.33",
|
|
41
|
-
"rebuildjs": "^0.
|
|
41
|
+
"rebuildjs": "^0.47.1",
|
|
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
|
-
"esmock": "^2.6.
|
|
48
|
-
"relementjs": "^0.
|
|
47
|
+
"esmock": "^2.6.3",
|
|
48
|
+
"relementjs": "^0.54.1",
|
|
49
49
|
"tsx": "^4.7.0",
|
|
50
50
|
"typescript": "next",
|
|
51
51
|
"uvu": "^0.5.6"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Plugin } from 'esbuild'
|
|
2
2
|
import type { ctx__be_T, ctx__get_T, ctx__set_T, sig_T } from 'rebuildjs/server'
|
|
3
|
+
import type { Config } from 'tailwindcss'
|
|
3
4
|
export declare const rebuild_tailwind_plugin__build_id$_:ctx__be_T<sig_T<string|undefined>, 'app'>
|
|
4
5
|
export declare const rebuild_tailwind_plugin__build_id_:ctx__get_T<string|undefined, 'app'>
|
|
5
6
|
export declare const rebuild_tailwind_plugin__build_id__set:ctx__set_T<string|undefined, 'app'>
|
|
6
7
|
export declare const rebuild_tailwind_plugin__ready$_:ctx__be_T<sig_T<boolean>, 'app'>
|
|
7
8
|
export declare const rebuild_tailwind_plugin__ready_:ctx__get_T<boolean, 'app'>
|
|
8
|
-
export declare function rebuild_tailwind_plugin_():Plugin
|
|
9
|
+
export declare function rebuild_tailwind_plugin_(config?:Config):Plugin
|
|
@@ -30,7 +30,7 @@ export const [
|
|
|
30
30
|
&& rebuildjs__ready_(ctx)
|
|
31
31
|
&& build_id_(ctx) === rebuild_tailwind_plugin__build_id_(ctx)),
|
|
32
32
|
{ id: 'rebuild_tailwind_plugin__ready', ns: 'app' })
|
|
33
|
-
export function rebuild_tailwind_plugin_() {
|
|
33
|
+
export function rebuild_tailwind_plugin_(config) {
|
|
34
34
|
return { name: 'rebuild_tailwind_plugin', setup: setup_() }
|
|
35
35
|
function setup_() {
|
|
36
36
|
/**
|
|
@@ -72,7 +72,7 @@ export function rebuild_tailwind_plugin_() {
|
|
|
72
72
|
throw err
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
|
|
75
|
+
* @param {rebuildjs_metafile_T['outputs'][string]}output
|
|
76
76
|
* @returns {Promise<void>}
|
|
77
77
|
*/
|
|
78
78
|
async function output__process(
|
|
@@ -91,8 +91,12 @@ export function rebuild_tailwind_plugin_() {
|
|
|
91
91
|
const esbuild_cssBundle_map_exists = await cmd(file_exists_(esbuild_cssBundle_map_path))
|
|
92
92
|
const result = await cmd(postcss([
|
|
93
93
|
tailwind({
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
...config,
|
|
95
|
+
content: [
|
|
96
|
+
...output.cssBundle_content.map(content__relative_path=>
|
|
97
|
+
join(cwd_(ctx), content__relative_path)),
|
|
98
|
+
...(config?.content ?? [])
|
|
99
|
+
]
|
|
96
100
|
})
|
|
97
101
|
]).process(
|
|
98
102
|
await cmd(readFile(esbuild_cssBundle_path)),
|