@tailwindcss/postcss 0.0.0-development.1
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/dist/index.d.ts +7 -0
- package/dist/index.js +48 -0
- package/package.json +21 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/index.ts
|
|
2
|
+
require('postcss');
|
|
3
|
+
var _tailwindcss = require('tailwindcss');
|
|
4
|
+
var _oxide = require('@tailwindcss/oxide');
|
|
5
|
+
function tailwindcss(opts) {
|
|
6
|
+
return {
|
|
7
|
+
postcssPlugin: "tailwindcss-v4",
|
|
8
|
+
AtRule: {
|
|
9
|
+
tailwind: async (atRule, { result, postcss }) => {
|
|
10
|
+
console.time("Tailwind CSS");
|
|
11
|
+
console.time("Resolve project");
|
|
12
|
+
let project = _oxide.resolveProject.call(void 0, { base: process.cwd() });
|
|
13
|
+
console.timeEnd("Resolve project");
|
|
14
|
+
console.time("Compile CSS");
|
|
15
|
+
let css = _tailwindcss.preflight + _tailwindcss.compile.call(void 0, project.candidates);
|
|
16
|
+
console.timeEnd("Compile CSS");
|
|
17
|
+
for (let file of project.files) {
|
|
18
|
+
result.messages.push({
|
|
19
|
+
type: "dependency",
|
|
20
|
+
plugin: "tailwindcss-v4",
|
|
21
|
+
file,
|
|
22
|
+
parent: result.opts.from
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
for (let { base, glob } of project.globs) {
|
|
26
|
+
result.messages.push({
|
|
27
|
+
type: "dir-dependency",
|
|
28
|
+
plugin: "tailwindcss-v4",
|
|
29
|
+
dir: base,
|
|
30
|
+
glob,
|
|
31
|
+
parent: result.opts.from
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
console.time("Parsing CSS");
|
|
35
|
+
let result2 = postcss.parse(css);
|
|
36
|
+
console.timeEnd("Parsing CSS");
|
|
37
|
+
atRule.replaceWith(result2);
|
|
38
|
+
console.timeEnd("Tailwind CSS");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var src_default = Object.assign(tailwindcss, { postcss: true });
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
exports.default = src_default;
|
|
47
|
+
|
|
48
|
+
module.exports = exports.default;
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tailwindcss/postcss",
|
|
3
|
+
"version": "0.0.0-development.1",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "tsup-node ./src/index.ts --format cjs --dts --cjsInterop --splitting",
|
|
6
|
+
"dev": "npm run build -- --watch"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"require": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"tailwindcss": "0.0.0-development.1",
|
|
19
|
+
"@tailwindcss/oxide": "0.0.0-development.1"
|
|
20
|
+
}
|
|
21
|
+
}
|