@lastbrain/app 0.1.11 → 0.1.13
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/scripts/init-app.js +24 -12
- package/package.json +1 -1
- package/src/scripts/init-app.ts +24 -12
package/dist/scripts/init-app.js
CHANGED
|
@@ -240,8 +240,8 @@ async function addDependencies(targetDir, useHeroUI, withAuth, selectedModules =
|
|
|
240
240
|
}
|
|
241
241
|
// DevDependencies
|
|
242
242
|
const requiredDevDeps = {
|
|
243
|
-
tailwindcss: "^
|
|
244
|
-
|
|
243
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
244
|
+
tailwindcss: "^4.0.0",
|
|
245
245
|
autoprefixer: "^10.4.20",
|
|
246
246
|
typescript: "^5.4.0",
|
|
247
247
|
"@types/node": "^20.0.0",
|
|
@@ -349,9 +349,7 @@ export default function RootLayout({ children }: PropsWithChildren<{}>) {
|
|
|
349
349
|
// Créer globals.css
|
|
350
350
|
const globalsPath = path.join(stylesDir, "globals.css");
|
|
351
351
|
if (!fs.existsSync(globalsPath) || force) {
|
|
352
|
-
const globalsContent = `@
|
|
353
|
-
@tailwind components;
|
|
354
|
-
@tailwind utilities;
|
|
352
|
+
const globalsContent = `@import "tailwindcss";
|
|
355
353
|
`;
|
|
356
354
|
await fs.writeFile(globalsPath, globalsContent);
|
|
357
355
|
console.log(chalk.green("✓ styles/globals.css créé"));
|
|
@@ -627,8 +625,14 @@ const config = {
|
|
|
627
625
|
content: [
|
|
628
626
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
629
627
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
630
|
-
|
|
631
|
-
|
|
628
|
+
{
|
|
629
|
+
raw: "",
|
|
630
|
+
files: [
|
|
631
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
632
|
+
"./node_modules/@heroui/*/src/**/*.{js,jsx,ts,tsx}"
|
|
633
|
+
],
|
|
634
|
+
relative: true
|
|
635
|
+
}
|
|
632
636
|
],
|
|
633
637
|
theme: {
|
|
634
638
|
extend: {},
|
|
@@ -642,11 +646,18 @@ export default config;
|
|
|
642
646
|
}
|
|
643
647
|
else {
|
|
644
648
|
// Configuration Tailwind CSS uniquement
|
|
645
|
-
tailwindConfig =
|
|
649
|
+
tailwindConfig = `/** @type {import('tailwindcss').Config} */
|
|
650
|
+
const config = {
|
|
646
651
|
content: [
|
|
647
652
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
648
653
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
649
|
-
|
|
654
|
+
{
|
|
655
|
+
raw: "",
|
|
656
|
+
files: [
|
|
657
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
658
|
+
],
|
|
659
|
+
relative: true
|
|
660
|
+
}
|
|
650
661
|
],
|
|
651
662
|
theme: {
|
|
652
663
|
extend: {
|
|
@@ -668,7 +679,9 @@ export default config;
|
|
|
668
679
|
},
|
|
669
680
|
},
|
|
670
681
|
plugins: [],
|
|
671
|
-
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export default config;
|
|
672
685
|
`;
|
|
673
686
|
}
|
|
674
687
|
await fs.writeFile(tailwindConfigPath, tailwindConfig);
|
|
@@ -679,8 +692,7 @@ export default config;
|
|
|
679
692
|
if (!fs.existsSync(postcssConfigPath) || force) {
|
|
680
693
|
const postcssConfig = `export default {
|
|
681
694
|
plugins: {
|
|
682
|
-
tailwindcss: {},
|
|
683
|
-
autoprefixer: {},
|
|
695
|
+
'@tailwindcss/postcss': {},
|
|
684
696
|
},
|
|
685
697
|
};
|
|
686
698
|
`;
|
package/package.json
CHANGED
package/src/scripts/init-app.ts
CHANGED
|
@@ -306,8 +306,8 @@ async function addDependencies(
|
|
|
306
306
|
|
|
307
307
|
// DevDependencies
|
|
308
308
|
const requiredDevDeps = {
|
|
309
|
-
tailwindcss: "^
|
|
310
|
-
|
|
309
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
310
|
+
tailwindcss: "^4.0.0",
|
|
311
311
|
autoprefixer: "^10.4.20",
|
|
312
312
|
typescript: "^5.4.0",
|
|
313
313
|
"@types/node": "^20.0.0",
|
|
@@ -430,9 +430,7 @@ export default function RootLayout({ children }: PropsWithChildren<{}>) {
|
|
|
430
430
|
// Créer globals.css
|
|
431
431
|
const globalsPath = path.join(stylesDir, "globals.css");
|
|
432
432
|
if (!fs.existsSync(globalsPath) || force) {
|
|
433
|
-
const globalsContent = `@
|
|
434
|
-
@tailwind components;
|
|
435
|
-
@tailwind utilities;
|
|
433
|
+
const globalsContent = `@import "tailwindcss";
|
|
436
434
|
`;
|
|
437
435
|
await fs.writeFile(globalsPath, globalsContent);
|
|
438
436
|
console.log(chalk.green("✓ styles/globals.css créé"));
|
|
@@ -743,8 +741,14 @@ const config = {
|
|
|
743
741
|
content: [
|
|
744
742
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
745
743
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
746
|
-
|
|
747
|
-
|
|
744
|
+
{
|
|
745
|
+
raw: "",
|
|
746
|
+
files: [
|
|
747
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
748
|
+
"./node_modules/@heroui/*/src/**/*.{js,jsx,ts,tsx}"
|
|
749
|
+
],
|
|
750
|
+
relative: true
|
|
751
|
+
}
|
|
748
752
|
],
|
|
749
753
|
theme: {
|
|
750
754
|
extend: {},
|
|
@@ -757,11 +761,18 @@ export default config;
|
|
|
757
761
|
`;
|
|
758
762
|
} else {
|
|
759
763
|
// Configuration Tailwind CSS uniquement
|
|
760
|
-
tailwindConfig =
|
|
764
|
+
tailwindConfig = `/** @type {import('tailwindcss').Config} */
|
|
765
|
+
const config = {
|
|
761
766
|
content: [
|
|
762
767
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
763
768
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
764
|
-
|
|
769
|
+
{
|
|
770
|
+
raw: "",
|
|
771
|
+
files: [
|
|
772
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
773
|
+
],
|
|
774
|
+
relative: true
|
|
775
|
+
}
|
|
765
776
|
],
|
|
766
777
|
theme: {
|
|
767
778
|
extend: {
|
|
@@ -783,7 +794,9 @@ export default config;
|
|
|
783
794
|
},
|
|
784
795
|
},
|
|
785
796
|
plugins: [],
|
|
786
|
-
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
export default config;
|
|
787
800
|
`;
|
|
788
801
|
}
|
|
789
802
|
|
|
@@ -796,8 +809,7 @@ export default config;
|
|
|
796
809
|
if (!fs.existsSync(postcssConfigPath) || force) {
|
|
797
810
|
const postcssConfig = `export default {
|
|
798
811
|
plugins: {
|
|
799
|
-
tailwindcss: {},
|
|
800
|
-
autoprefixer: {},
|
|
812
|
+
'@tailwindcss/postcss': {},
|
|
801
813
|
},
|
|
802
814
|
};
|
|
803
815
|
`;
|