create-prisma-php-app 1.2.10 → 1.2.11

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 CHANGED
@@ -135,6 +135,14 @@ function modifyIndexPHP(baseDir, useTailwind) {
135
135
  // Insert before the closing </head> tag
136
136
  indexContent = indexContent.replace("</head>", `${tailwindLink}\n</head>`);
137
137
  fs.writeFileSync(indexPath, indexContent, "utf8");
138
+ // Remove src/css if tailwind is not chosen
139
+ if (!useTailwind) {
140
+ const cssPath = path.join(baseDir, "src", "app", "css");
141
+ fs.rm(cssPath, { recursive: true }, (err) => {
142
+ if (err)
143
+ throw err;
144
+ });
145
+ }
138
146
  console.log(chalk.green(`index.php modified successfully for ${useTailwind ? "local Tailwind CSS" : "Tailwind CSS CDN"}.`));
139
147
  }
140
148
  catch (error) {
@@ -148,9 +156,6 @@ async function createDirectoryStructure(baseDir, answer, projectSettings) {
148
156
  { src: "/../composer.json", dest: "/composer.json" },
149
157
  { src: "/../composer.lock", dest: "/composer.lock" },
150
158
  ];
151
- if (answer.tailwindcss) {
152
- filesToCopy.push({ src: "/styles.css", dest: "/src/app/css/styles.css" }, { src: "/tailwind.css", dest: "/src/app/css/tailwind.css" });
153
- }
154
159
  const directoriesToCopy = [
155
160
  {
156
161
  srcDir: "/settings",
@@ -160,6 +165,10 @@ async function createDirectoryStructure(baseDir, answer, projectSettings) {
160
165
  srcDir: "/prisma",
161
166
  destDir: "/prisma",
162
167
  },
168
+ {
169
+ srcDir: "/public",
170
+ destDir: "/public",
171
+ },
163
172
  {
164
173
  srcDir: "/src",
165
174
  destDir: "/src",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
File without changes
File without changes