@lazarv/create-react-server 0.0.0-experimental-989cf02-20250217-d62ba1cb → 0.0.0-experimental-f35c661-20250227-d31930e2
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/globals.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazarv/create-react-server",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-f35c661-20250227-d31930e2",
|
|
4
4
|
"bin": {
|
|
5
5
|
"create-react-server": "index.mjs"
|
|
6
6
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"prettier": "^3.0.0",
|
|
41
41
|
"ts-morph": "^24.0.0",
|
|
42
|
-
"@lazarv/react-server": "0.0.0-experimental-
|
|
42
|
+
"@lazarv/react-server": "0.0.0-experimental-be787f2-20250217-12688b9b"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=20.10.0"
|
package/steps/features.mjs
CHANGED
|
@@ -30,11 +30,18 @@ export default async (context) => {
|
|
|
30
30
|
checked: context.props.preset?.features.includes("prettier"),
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
name: "Tailwind CSS",
|
|
33
|
+
name: "Tailwind CSS v3",
|
|
34
34
|
value: "tailwind",
|
|
35
|
-
description:
|
|
35
|
+
description:
|
|
36
|
+
"Add Tailwind CSS v3 support (using PostCSS and Autoprefixer)",
|
|
36
37
|
checked: context.props.preset?.features.includes("tailwind"),
|
|
37
38
|
},
|
|
39
|
+
{
|
|
40
|
+
name: "Tailwind CSS v4",
|
|
41
|
+
value: "tailwind-v4",
|
|
42
|
+
description: "Add Tailwind CSS support (using the official Vite plugin)",
|
|
43
|
+
checked: context.props.preset?.features.includes("tailwind-v4"),
|
|
44
|
+
},
|
|
38
45
|
{
|
|
39
46
|
name: "Lightning CSS",
|
|
40
47
|
value: "lightningcss",
|
|
@@ -234,17 +241,63 @@ import tsParser from "@typescript-eslint/parser";`,
|
|
|
234
241
|
}
|
|
235
242
|
|
|
236
243
|
if (answer.includes("tailwind")) {
|
|
244
|
+
if (!answer.includes("tailwind-v4")) {
|
|
245
|
+
partials["package.json"] = {
|
|
246
|
+
...partials["package.json"],
|
|
247
|
+
merge: [
|
|
248
|
+
...partials["package.json"].merge,
|
|
249
|
+
await json(context.env.templateDir, "package.tailwind.json"),
|
|
250
|
+
],
|
|
251
|
+
};
|
|
252
|
+
partials["src/global.css"] = {
|
|
253
|
+
content: `@tailwind base;
|
|
254
|
+
@tailwind components;
|
|
255
|
+
@tailwind utilities;`,
|
|
256
|
+
};
|
|
257
|
+
files.push(
|
|
258
|
+
join(context.env.templateDir, "tailwind.config.mjs"),
|
|
259
|
+
join(context.env.templateDir, "postcss.config.mjs")
|
|
260
|
+
);
|
|
261
|
+
} else {
|
|
262
|
+
context.env.logger.warn(
|
|
263
|
+
"You should not use different Tailwind CSS versions at the same time. Tailwind CSS v3 will not be installed."
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (answer.includes("tailwind-v4")) {
|
|
237
269
|
partials["package.json"] = {
|
|
238
270
|
...partials["package.json"],
|
|
239
271
|
merge: [
|
|
240
272
|
...partials["package.json"].merge,
|
|
241
|
-
await json(context.env.templateDir, "package.tailwind.json"),
|
|
273
|
+
await json(context.env.templateDir, "package.tailwind-v4.json"),
|
|
242
274
|
],
|
|
243
275
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
)
|
|
276
|
+
partials["src/global.css"] = {
|
|
277
|
+
content: `@import "tailwindcss";`,
|
|
278
|
+
};
|
|
279
|
+
if (answer.includes("ts")) {
|
|
280
|
+
partials["vite.config.ts"] = {
|
|
281
|
+
...partials["vite.config.ts"],
|
|
282
|
+
merge: [
|
|
283
|
+
await readFile(
|
|
284
|
+
join(context.env.templateDir, "vite.config.tailwind-v4.ts"),
|
|
285
|
+
"utf8"
|
|
286
|
+
),
|
|
287
|
+
],
|
|
288
|
+
};
|
|
289
|
+
} else {
|
|
290
|
+
partials["vite.config.mjs"] = {
|
|
291
|
+
...partials["vite.config.mjs"],
|
|
292
|
+
type: "code",
|
|
293
|
+
merge: [
|
|
294
|
+
await readFile(
|
|
295
|
+
join(context.env.templateDir, "vite.config.tailwind-v4.mjs"),
|
|
296
|
+
"utf8"
|
|
297
|
+
),
|
|
298
|
+
],
|
|
299
|
+
};
|
|
300
|
+
}
|
|
248
301
|
}
|
|
249
302
|
|
|
250
303
|
if (answer.includes("css-modules")) {
|