create-prisma-php-app 1.18.504 → 1.18.506
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 +19 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -426,7 +426,7 @@ async function createDirectoryStructure(baseDir, answer) {
|
|
|
426
426
|
modifyLayoutPHP(baseDir, answer);
|
|
427
427
|
modifyPostcssConfig(baseDir);
|
|
428
428
|
} else {
|
|
429
|
-
modifyLayoutPHP(baseDir, answer);
|
|
429
|
+
if (!answer.backendOnly) modifyLayoutPHP(baseDir, answer);
|
|
430
430
|
}
|
|
431
431
|
const prismaPHPEnvContent = `# Prisma PHP Auth Secret Key For development only - Change this in production
|
|
432
432
|
AUTH_SECRET=uxsjXVPHN038DEYls2Kw0QUgBcXKUyrjv416nIFWPY4=
|
|
@@ -872,6 +872,24 @@ async function main() {
|
|
|
872
872
|
: updateAnswer.isUpdate
|
|
873
873
|
) {
|
|
874
874
|
const updateUninstallDependencies = [];
|
|
875
|
+
if (updateAnswer.backendOnly) {
|
|
876
|
+
const backendOnlyFiles = [
|
|
877
|
+
"favicon.ico",
|
|
878
|
+
"index.php",
|
|
879
|
+
"layout.php",
|
|
880
|
+
"metadata.php",
|
|
881
|
+
"not-found.php",
|
|
882
|
+
];
|
|
883
|
+
backendOnlyFiles.forEach((file) => {
|
|
884
|
+
const filePath = path.join(projectPath, "src", "app", file);
|
|
885
|
+
if (fs.existsSync(filePath)) {
|
|
886
|
+
fs.unlinkSync(filePath); // Delete each file if it exists
|
|
887
|
+
console.log(`${file} was deleted successfully.`);
|
|
888
|
+
} else {
|
|
889
|
+
console.log(`${file} does not exist.`);
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
875
893
|
if (!updateAnswer.tailwindcss) {
|
|
876
894
|
const tailwindFiles = ["postcss.config.js", "tailwind.config.js"];
|
|
877
895
|
tailwindFiles.forEach((file) => {
|