create-kide-app 0.0.15 → 0.0.17
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/index.js +10 -4
- package/package.json +1 -1
- package/templates/base/gitignore +8 -0
- package/templates/base/package.json +2 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as p from "@clack/prompts";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
|
-
import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
@@ -77,6 +77,13 @@ async function main() {
|
|
|
77
77
|
|
|
78
78
|
cpSync(path.join(TEMPLATES_DIR, "base"), projectDir, { recursive: true });
|
|
79
79
|
|
|
80
|
+
// Rename gitignore → .gitignore (npm strips dotfiles from published tarballs)
|
|
81
|
+
const gitignoreSrc = path.join(projectDir, "gitignore");
|
|
82
|
+
if (existsSync(gitignoreSrc)) {
|
|
83
|
+
cpSync(gitignoreSrc, path.join(projectDir, ".gitignore"));
|
|
84
|
+
rmSync(gitignoreSrc);
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
// Apply demo schema and seed data if selected
|
|
81
88
|
if (seedDemo) {
|
|
82
89
|
cpSync(path.join(TEMPLATES_DIR, "demo"), projectDir, { recursive: true });
|
|
@@ -133,9 +140,8 @@ async function main() {
|
|
|
133
140
|
|
|
134
141
|
if (target === "cloudflare") {
|
|
135
142
|
const gitignorePath = path.join(projectDir, ".gitignore");
|
|
136
|
-
|
|
137
|
-
gitignore
|
|
138
|
-
writeFileSync(gitignorePath, gitignore);
|
|
143
|
+
const gitignore = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
|
|
144
|
+
writeFileSync(gitignorePath, gitignore + "\n# Cloudflare\n.wrangler/\n");
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
s.stop("Configuration applied");
|
package/package.json
CHANGED