brisa-tailwindcss 0.0.228
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/README.md +5 -0
- package/index.d.ts +5 -0
- package/index.ts +20 -0
- package/package.json +35 -0
package/README.md
ADDED
package/index.d.ts
ADDED
package/index.ts
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
import tailwindcss from '@tailwindcss/postcss';
|
2
|
+
import fs from 'node:fs';
|
3
|
+
import postcss from 'postcss';
|
4
|
+
|
5
|
+
// Note: is not bundled here to avoid issues with lightningcss
|
6
|
+
export default function brisaTailwindcss() {
|
7
|
+
return {
|
8
|
+
name: 'brisa-tailwindcss',
|
9
|
+
async transpileCSS(pathname: string) {
|
10
|
+
const content = fs.readFileSync(pathname, 'utf-8');
|
11
|
+
const transpiledContent = await postcss([tailwindcss]).process(content, {
|
12
|
+
from: pathname,
|
13
|
+
});
|
14
|
+
// Add :host to all :root selectors to support shadow DOM
|
15
|
+
return transpiledContent.css.replaceAll(':root', ':root, :host');
|
16
|
+
},
|
17
|
+
defaultCSSContent:
|
18
|
+
'@tailwind base;\n@tailwind components;\n@tailwind utilities;',
|
19
|
+
};
|
20
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"name": "brisa-tailwindcss",
|
3
|
+
"version": "0.0.228",
|
4
|
+
"license": "MIT",
|
5
|
+
"type": "module",
|
6
|
+
"main": "./index.js",
|
7
|
+
"module": "./index.js",
|
8
|
+
"types": "./index.d.ts",
|
9
|
+
"author": "Aral Roca Gòmez <contact@aralroca.com>",
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git+https://github.com/brisa-build/brisa.git",
|
13
|
+
"directory": "packages/brisa-tailwindcss"
|
14
|
+
},
|
15
|
+
"files": ["index.ts", "index.d.ts"],
|
16
|
+
"dependencies": {
|
17
|
+
"@tailwindcss/postcss": "4.0.0-alpha.21",
|
18
|
+
"postcss": "8.4.47"
|
19
|
+
},
|
20
|
+
"peerDependencies": {
|
21
|
+
"tailwindcss": "4.0.0-alpha.21"
|
22
|
+
},
|
23
|
+
"packageManager": "bun@1.1.30",
|
24
|
+
"engines": {
|
25
|
+
"bun": ">= 1.1.30",
|
26
|
+
"npm": "please-use-bun",
|
27
|
+
"yarn": "please-use-bun",
|
28
|
+
"pnpm": "please-use-bun"
|
29
|
+
},
|
30
|
+
"description": "A Brisa integration with Tailwind CSS.",
|
31
|
+
"bugs": {
|
32
|
+
"url": "https://github.com/brisa-build/brisa/issues"
|
33
|
+
},
|
34
|
+
"homepage": "https://github.com/brisa-build/brisa#readme"
|
35
|
+
}
|