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