@webhouse/create-cms 0.2.0 → 0.2.2
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 +26 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24,8 +24,8 @@ if (existsSync(projectDir)) {
|
|
|
24
24
|
}
|
|
25
25
|
function write(relativePath, content) {
|
|
26
26
|
const fullPath = join(projectDir, relativePath);
|
|
27
|
-
const
|
|
28
|
-
if (!existsSync(
|
|
27
|
+
const dir2 = fullPath.substring(0, fullPath.lastIndexOf("/"));
|
|
28
|
+
if (!existsSync(dir2)) mkdirSync(dir2, { recursive: true });
|
|
29
29
|
writeFileSync(fullPath, content, "utf-8");
|
|
30
30
|
console.log(` ${green("\u2713")} ${relativePath}`);
|
|
31
31
|
}
|
|
@@ -169,11 +169,32 @@ write("package.json", JSON.stringify({
|
|
|
169
169
|
build: "cms build"
|
|
170
170
|
},
|
|
171
171
|
dependencies: {
|
|
172
|
-
"@webhouse/cms": "^0.
|
|
173
|
-
"@webhouse/cms-cli": "^0.
|
|
172
|
+
"@webhouse/cms": "^0.2.0",
|
|
173
|
+
"@webhouse/cms-cli": "^0.2.0"
|
|
174
|
+
}
|
|
175
|
+
}, null, 2) + "\n");
|
|
176
|
+
mkdirSync(join(dir, ".claude"), { recursive: true });
|
|
177
|
+
write(".claude/settings.json", JSON.stringify({
|
|
178
|
+
permissions: {
|
|
179
|
+
allow: [
|
|
180
|
+
"Read",
|
|
181
|
+
"Write",
|
|
182
|
+
"Edit",
|
|
183
|
+
"Glob",
|
|
184
|
+
"Grep",
|
|
185
|
+
"Bash(npm install)",
|
|
186
|
+
"Bash(npm ci)",
|
|
187
|
+
"Bash(npm run *)",
|
|
188
|
+
"Bash(npx next *)",
|
|
189
|
+
"Bash(npx cms *)",
|
|
190
|
+
"Bash(npx @webhouse/cms-cli *)",
|
|
191
|
+
"Bash(git *)",
|
|
192
|
+
"Bash(ls *)",
|
|
193
|
+
"Bash(mkdir *)",
|
|
194
|
+
"Bash(cat *)"
|
|
195
|
+
]
|
|
174
196
|
}
|
|
175
197
|
}, null, 2) + "\n");
|
|
176
|
-
write(".nvmrc", "22\n");
|
|
177
198
|
console.log("");
|
|
178
199
|
function detectPackageManager() {
|
|
179
200
|
const userAgent = process.env.npm_config_user_agent || "";
|