@webhouse/create-cms 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/dist/index.js +44 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
+ }) : x)(function(x) {
5
+ if (typeof require !== "undefined") return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
2
8
 
3
9
  // src/index.ts
4
10
  import { existsSync, mkdirSync, readdirSync, writeFileSync } from "fs";
@@ -185,16 +191,46 @@ write(".claude/settings.json", JSON.stringify({
185
191
  "Bash(npm install)",
186
192
  "Bash(npm ci)",
187
193
  "Bash(npm run *)",
194
+ "Bash(pnpm install)",
195
+ "Bash(pnpm add *)",
196
+ "Bash(pnpm run *)",
197
+ "Bash(pnpm exec *)",
188
198
  "Bash(npx next *)",
189
199
  "Bash(npx cms *)",
190
200
  "Bash(npx @webhouse/cms-cli *)",
191
201
  "Bash(git *)",
192
202
  "Bash(ls *)",
193
- "Bash(mkdir *)",
194
- "Bash(cat *)"
203
+ "Bash(mkdir *)"
195
204
  ]
196
205
  }
197
206
  }, null, 2) + "\n");
207
+ write("start.sh", `#!/bin/bash
208
+ # Start a Claude Code session to build your site
209
+ # Usage: bash start.sh [optional prompt]
210
+
211
+ set -e
212
+ cd "$(dirname "$0")"
213
+
214
+ # Install dependencies if needed
215
+ if [ ! -d "node_modules" ]; then
216
+ echo "Installing dependencies..."
217
+ npm install 2>/dev/null || pnpm install 2>/dev/null || yarn install 2>/dev/null
218
+ fi
219
+
220
+ # Default prompt if none provided
221
+ PROMPT="\${1:-Byg et Next.js site med App Router og Tailwind CSS. L\xE6s CLAUDE.md for at forst\xE5 CMS\\'et og dets field types. Opret content i content/ mappen som JSON-filer. Start med et homepage og en blog sektion.}"
222
+
223
+ echo ""
224
+ echo "Starting Claude Code..."
225
+ echo ""
226
+
227
+ claude "$PROMPT"
228
+ `);
229
+ try {
230
+ const { chmodSync } = __require("fs");
231
+ chmodSync(join(dir, "start.sh"), 493);
232
+ } catch {
233
+ }
198
234
  console.log("");
199
235
  function detectPackageManager() {
200
236
  const userAgent = process.env.npm_config_user_agent || "";
@@ -226,18 +262,15 @@ try {
226
262
  console.log("");
227
263
  console.log(`${green("\u2713")} Project created at ${dim(projectDir)}`);
228
264
  console.log("");
229
- console.log(bold("Next steps:"));
265
+ console.log(bold("Quick start:"));
230
266
  console.log("");
231
267
  console.log(` ${dim("$")} cd ${projectName}`);
232
- console.log(` ${dim("$")} npx @webhouse/cms-cli dev ${dim("# Start CMS admin UI")}`);
233
- console.log("");
234
- console.log(bold("AI content generation:"));
268
+ console.log(` ${dim("$")} bash start.sh ${dim("# Start Claude Code to build your site")}`);
235
269
  console.log("");
236
- console.log(` 1. Add your ANTHROPIC_API_KEY to .env`);
237
- console.log(` 2. ${dim("$")} npx @webhouse/cms-cli ai generate posts "Write a blog post about..."`);
270
+ console.log(bold("Or with a custom prompt:"));
238
271
  console.log("");
239
- console.log(bold("MCP integration:"));
272
+ console.log(` ${dim("$")} bash start.sh "Build a portfolio site with dark theme"`);
240
273
  console.log("");
241
- console.log(` .mcp.json is already configured \u2014 Claude Code and other`);
242
- console.log(` MCP-compatible agents can manage your content automatically.`);
274
+ console.log(dim(" Claude Code will read CLAUDE.md and understand how to use the CMS."));
275
+ console.log(dim(" Content is stored as JSON in content/ \u2014 no server needed."));
243
276
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webhouse/create-cms",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Scaffold a new @webhouse/cms project",
5
5
  "type": "module",
6
6
  "license": "MIT",