create-kide-app 0.1.4 → 0.1.6
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/README.md +14 -12
- package/index.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,27 +5,29 @@ Scaffold a new [Kide CMS](https://github.com/mhernesniemi/kide-cms) project.
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
# or
|
|
10
|
-
pnpm create kide-app my-project
|
|
11
|
-
# or
|
|
12
|
-
bunx create-kide-app my-project
|
|
8
|
+
pnpx create-kide-app my-project
|
|
13
9
|
```
|
|
14
10
|
|
|
15
|
-
The CLI
|
|
11
|
+
The CLI asks for:
|
|
16
12
|
|
|
17
13
|
1. **Project name** — directory to create
|
|
18
14
|
2. **Deploy target** — Local/Node.js or Cloudflare
|
|
19
|
-
3. **
|
|
15
|
+
3. **Seed demo content** — local target only
|
|
20
16
|
|
|
21
17
|
## What it does
|
|
22
18
|
|
|
23
|
-
-
|
|
24
|
-
- Applies
|
|
25
|
-
- Installs dependencies
|
|
26
|
-
-
|
|
27
|
-
-
|
|
19
|
+
- Clones the latest Kide CMS from GitHub.
|
|
20
|
+
- Applies target-specific configuration (Node.js adapter, or Cloudflare D1/R2/Workers).
|
|
21
|
+
- Installs dependencies with pnpm.
|
|
22
|
+
- Optionally creates a GitHub repo (if the `gh` CLI is installed and authenticated).
|
|
23
|
+
- Generates the CMS schema.
|
|
24
|
+
- For **local**: optionally seeds demo content, then starts the dev server.
|
|
25
|
+
- For **Cloudflare**: logs into wrangler (if needed), creates a D1 database and R2 bucket, applies migrations, builds and deploys, and prints the live URL + admin URL.
|
|
28
26
|
|
|
29
27
|
## Requirements
|
|
30
28
|
|
|
31
29
|
- Node.js >= 22.12.0
|
|
30
|
+
- `pnpm` installed
|
|
31
|
+
- `git` on PATH
|
|
32
|
+
- Optional: [`gh` CLI](https://cli.github.com) authenticated (`gh auth login`) for GitHub repo creation
|
|
33
|
+
- For Cloudflare: a Cloudflare account (the CLI runs `wrangler login` for you)
|
package/index.js
CHANGED
|
@@ -251,7 +251,15 @@ async function main() {
|
|
|
251
251
|
if (!p.isCancel(visibility)) {
|
|
252
252
|
s.start("Creating GitHub repository");
|
|
253
253
|
try {
|
|
254
|
-
execSync(`gh repo create ${repoName} ${visibility}
|
|
254
|
+
execSync(`gh repo create ${repoName} ${visibility}`, { cwd: projectDir, stdio: "pipe" });
|
|
255
|
+
|
|
256
|
+
// Use SSH for the remote (works with the user's existing SSH keys;
|
|
257
|
+
// avoids HTTPS credential prompts when gh's git_protocol defaults to https).
|
|
258
|
+
execSync(`git remote add origin git@github.com:${ghUser}/${repoName}.git`, {
|
|
259
|
+
cwd: projectDir,
|
|
260
|
+
stdio: "pipe",
|
|
261
|
+
});
|
|
262
|
+
execSync("git branch -M main && git push -u origin main", {
|
|
255
263
|
cwd: projectDir,
|
|
256
264
|
stdio: "pipe",
|
|
257
265
|
});
|