create-prisma-php-app 1.11.539 → 1.11.541
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.js +1 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -690,63 +690,6 @@ async function main() {
|
|
|
690
690
|
if (!fs.existsSync(publicDirPath)) {
|
|
691
691
|
fs.mkdirSync(publicDirPath);
|
|
692
692
|
}
|
|
693
|
-
// if (!answer.tailwindcss) {
|
|
694
|
-
// const cssPath = path.join(projectPath, "src", "app", "css");
|
|
695
|
-
// const tailwindFiles = ["tailwind.css", "styles.css"];
|
|
696
|
-
// tailwindFiles.forEach((file) => {
|
|
697
|
-
// const filePath = path.join(cssPath, file);
|
|
698
|
-
// if (fs.existsSync(filePath)) {
|
|
699
|
-
// fs.unlinkSync(filePath); // Delete each file if it exists
|
|
700
|
-
// console.log(`${file} was deleted successfully.`);
|
|
701
|
-
// } else {
|
|
702
|
-
// console.log(`${file} does not exist.`);
|
|
703
|
-
// }
|
|
704
|
-
// });
|
|
705
|
-
// }
|
|
706
|
-
// Update websocket if not chosen by the user
|
|
707
|
-
// if (!answer.websocket) {
|
|
708
|
-
// const wsPath = path.join(projectPath, "src", "Lib", "Websocket");
|
|
709
|
-
// // Check if the websocket directory exists
|
|
710
|
-
// if (fs.existsSync(wsPath)) {
|
|
711
|
-
// // Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
712
|
-
// fs.rmSync(wsPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
713
|
-
// console.log("Websocket directory was deleted successfully.");
|
|
714
|
-
// } else {
|
|
715
|
-
// console.log("Websocket directory does not exist.");
|
|
716
|
-
// }
|
|
717
|
-
// // Update settings directory if websocket is not chosen
|
|
718
|
-
// const settingsPath = path.join(projectPath, "settings");
|
|
719
|
-
// const websocketFiles = ["restart-websocket.cjs", "restart-websocket.bat"];
|
|
720
|
-
// websocketFiles.forEach((file) => {
|
|
721
|
-
// const filePath = path.join(settingsPath, file);
|
|
722
|
-
// if (fs.existsSync(filePath)) {
|
|
723
|
-
// fs.unlinkSync(filePath); // Delete each file if it exists
|
|
724
|
-
// console.log(`${file} was deleted successfully.`);
|
|
725
|
-
// } else {
|
|
726
|
-
// console.log(`${file} does not exist.`);
|
|
727
|
-
// }
|
|
728
|
-
// });
|
|
729
|
-
// }
|
|
730
|
-
if (!answer.prisma) {
|
|
731
|
-
const prismaPath = path.join(projectPath, "prisma");
|
|
732
|
-
const prismClassPath = path.join(projectPath, "src", "Lib", "Prisma");
|
|
733
|
-
// Check if the prisma directory exists
|
|
734
|
-
if (fs.existsSync(prismaPath)) {
|
|
735
|
-
// Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
736
|
-
fs.rmSync(prismaPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
737
|
-
console.log("Prisma directory was deleted successfully.");
|
|
738
|
-
} else {
|
|
739
|
-
console.log("Prisma directory does not exist.");
|
|
740
|
-
}
|
|
741
|
-
// Check if the prisma class directory exists
|
|
742
|
-
if (fs.existsSync(prismClassPath)) {
|
|
743
|
-
// Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
744
|
-
fs.rmSync(prismClassPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
745
|
-
console.log("Prisma class directory was deleted successfully.");
|
|
746
|
-
} else {
|
|
747
|
-
console.log("Prisma class directory does not exist.");
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
693
|
if (
|
|
751
694
|
updateAnswer === null || updateAnswer === void 0
|
|
752
695
|
? void 0
|
|
@@ -825,7 +768,7 @@ async function main() {
|
|
|
825
768
|
{ flag: "w" }
|
|
826
769
|
);
|
|
827
770
|
execSync(
|
|
828
|
-
`
|
|
771
|
+
`C:\\xampp\\php\\php.exe C:\\ProgramData\\ComposerSetup\\bin\\composer.phar install`,
|
|
829
772
|
{
|
|
830
773
|
stdio: "inherit",
|
|
831
774
|
}
|