create-prisma-php-app 1.6.28 → 1.6.30
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 +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -493,9 +493,13 @@ async function main() {
|
|
|
493
493
|
PHP_ROOT_PATH_EXE: "D:\\\\xampp\\\\php\\\\php.exe",
|
|
494
494
|
PHP_GENERATE_CLASS_PATH: "src/lib/prisma/classes",
|
|
495
495
|
};`;
|
|
496
|
-
|
|
496
|
+
console.log("🚀 ~ main ~ settingsCode:", settingsCode);
|
|
497
|
+
fs.writeFileSync(settingsPath, settingsCode, { flag: "w" });
|
|
497
498
|
// Create public directory
|
|
498
|
-
|
|
499
|
+
const publicDirPath = path.join(projectPath, "public");
|
|
500
|
+
if (!fs.existsSync(publicDirPath)) {
|
|
501
|
+
fs.mkdirSync(publicDirPath);
|
|
502
|
+
}
|
|
499
503
|
// Update css if tailwindcss is not chosen by the user
|
|
500
504
|
if (!answer.tailwindcss) {
|
|
501
505
|
// delete specific files of tailwindcss if not chosen
|
|
@@ -545,7 +549,7 @@ async function main() {
|
|
|
545
549
|
websocket: answer.websocket,
|
|
546
550
|
version,
|
|
547
551
|
};
|
|
548
|
-
fs.writeFileSync(path.join(projectPath, "prisma-php.json"), JSON.stringify(prismaPhpConfig, null, 2));
|
|
552
|
+
fs.writeFileSync(path.join(projectPath, "prisma-php.json"), JSON.stringify(prismaPhpConfig, null, 2), { flag: "w" });
|
|
549
553
|
console.log(`${chalk.green("Success!")} Prisma PHP project successfully created in ${answer.projectName}!`);
|
|
550
554
|
}
|
|
551
555
|
catch (error) {
|