@lastbrain/app 0.1.10 → 0.1.12
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 -20
- package/package.json +1 -1
- package/src/scripts/init-app.ts +24 -20
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éé"));
|
|
@@ -624,12 +622,14 @@ export default nextConfig;
|
|
|
624
622
|
|
|
625
623
|
/** @type {import('tailwindcss').Config} */
|
|
626
624
|
const config = {
|
|
627
|
-
content:
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
625
|
+
content: {
|
|
626
|
+
files: [
|
|
627
|
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
628
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
629
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
630
|
+
"./node_modules/@heroui/*/src/**/*.{js,jsx,ts,tsx}"
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
633
|
theme: {
|
|
634
634
|
extend: {},
|
|
635
635
|
},
|
|
@@ -642,12 +642,15 @@ export default config;
|
|
|
642
642
|
}
|
|
643
643
|
else {
|
|
644
644
|
// Configuration Tailwind CSS uniquement
|
|
645
|
-
tailwindConfig =
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
645
|
+
tailwindConfig = `/** @type {import('tailwindcss').Config} */
|
|
646
|
+
const config = {
|
|
647
|
+
content: {
|
|
648
|
+
files: [
|
|
649
|
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
650
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
651
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
652
|
+
]
|
|
653
|
+
},
|
|
651
654
|
theme: {
|
|
652
655
|
extend: {
|
|
653
656
|
colors: {
|
|
@@ -668,7 +671,9 @@ export default config;
|
|
|
668
671
|
},
|
|
669
672
|
},
|
|
670
673
|
plugins: [],
|
|
671
|
-
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export default config;
|
|
672
677
|
`;
|
|
673
678
|
}
|
|
674
679
|
await fs.writeFile(tailwindConfigPath, tailwindConfig);
|
|
@@ -679,8 +684,7 @@ export default config;
|
|
|
679
684
|
if (!fs.existsSync(postcssConfigPath) || force) {
|
|
680
685
|
const postcssConfig = `export default {
|
|
681
686
|
plugins: {
|
|
682
|
-
tailwindcss: {},
|
|
683
|
-
autoprefixer: {},
|
|
687
|
+
'@tailwindcss/postcss': {},
|
|
684
688
|
},
|
|
685
689
|
};
|
|
686
690
|
`;
|
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éé"));
|
|
@@ -740,12 +738,14 @@ export default nextConfig;
|
|
|
740
738
|
|
|
741
739
|
/** @type {import('tailwindcss').Config} */
|
|
742
740
|
const config = {
|
|
743
|
-
content:
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
741
|
+
content: {
|
|
742
|
+
files: [
|
|
743
|
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
744
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
745
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
746
|
+
"./node_modules/@heroui/*/src/**/*.{js,jsx,ts,tsx}"
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
749
|
theme: {
|
|
750
750
|
extend: {},
|
|
751
751
|
},
|
|
@@ -757,12 +757,15 @@ export default config;
|
|
|
757
757
|
`;
|
|
758
758
|
} else {
|
|
759
759
|
// Configuration Tailwind CSS uniquement
|
|
760
|
-
tailwindConfig =
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
760
|
+
tailwindConfig = `/** @type {import('tailwindcss').Config} */
|
|
761
|
+
const config = {
|
|
762
|
+
content: {
|
|
763
|
+
files: [
|
|
764
|
+
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
765
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
766
|
+
"./node_modules/@lastbrain/*/src/**/*.{js,jsx,ts,tsx}",
|
|
767
|
+
]
|
|
768
|
+
},
|
|
766
769
|
theme: {
|
|
767
770
|
extend: {
|
|
768
771
|
colors: {
|
|
@@ -783,7 +786,9 @@ export default config;
|
|
|
783
786
|
},
|
|
784
787
|
},
|
|
785
788
|
plugins: [],
|
|
786
|
-
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export default config;
|
|
787
792
|
`;
|
|
788
793
|
}
|
|
789
794
|
|
|
@@ -796,8 +801,7 @@ export default config;
|
|
|
796
801
|
if (!fs.existsSync(postcssConfigPath) || force) {
|
|
797
802
|
const postcssConfig = `export default {
|
|
798
803
|
plugins: {
|
|
799
|
-
tailwindcss: {},
|
|
800
|
-
autoprefixer: {},
|
|
804
|
+
'@tailwindcss/postcss': {},
|
|
801
805
|
},
|
|
802
806
|
};
|
|
803
807
|
`;
|