create-zenbu-app 0.0.20 → 0.0.21

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 CHANGED
@@ -8,53 +8,3 @@ cd my-app
8
8
  pnpm dev
9
9
  ```
10
10
 
11
- ## Interactive mode
12
-
13
- Run with no arguments to be prompted for a project name and config options:
14
-
15
- ```bash
16
- pnpm create zenbu-app
17
- ```
18
-
19
- You'll be asked for:
20
-
21
- - **Project name** — defaults to `my-zenbu-app` (just press enter to accept).
22
- - **Use Tailwind CSS?** — defaults to `yes`.
23
-
24
- Each prompt's default is selected when you press enter, so a default scaffold
25
- is just `enter, enter, enter`.
26
-
27
- ## Flags
28
-
29
- | Flag | Description |
30
- |---|---|
31
- | `--yes`, `-y` | Skip every prompt and take each option's default. With no project name, scaffolds into the current directory. |
32
- | `--no-install` | Skip the post-copy `<pm> install` step. |
33
-
34
- A few common invocations:
35
-
36
- ```bash
37
- pnpm create zenbu-app # interactive, then scaffolds ./my-zenbu-app
38
- pnpm create zenbu-app my-app # interactive options, scaffolds ./my-app
39
- pnpm create zenbu-app . # interactive options, scaffolds into cwd
40
- pnpm create zenbu-app --yes # all defaults, scaffolds into cwd
41
- pnpm create zenbu-app my-app --yes # all defaults, scaffolds ./my-app
42
- ```
43
-
44
- ## Templates
45
-
46
- The CLI ships full per-config copies of the project under `templates/<slug>/`
47
- — there are no in-template conditionals. Today:
48
-
49
- - `templates/tailwind/` — Tailwind CSS v4 wired up via `@tailwindcss/vite`.
50
- - `templates/vanilla/` — plain CSS, no utility framework.
51
-
52
- The selected slug is computed from the answered config options (Tailwind
53
- contributes `tailwind`; the empty set falls back to `vanilla`).
54
-
55
- ## Package manager support
56
-
57
- The detected invoking package manager is recorded in `zenbu.config.ts` and
58
- used for the post-copy install. pnpm, npm, yarn, and bun are all supported,
59
- but the bundled `.app` re-installs from the project's lockfile at first
60
- launch — so currently the lockfile must be a pnpm one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zenbu-app",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Scaffold a new Zenbu app",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -8,7 +8,8 @@
8
8
  "build:source": "zen build:source",
9
9
  "build:electron": "zen build:electron",
10
10
  "publish:source": "zen publish:source",
11
- "link": "zen link"
11
+ "link": "zen link",
12
+ "db:generate": "zen db generate"
12
13
  },
13
14
  "dependencies": {
14
15
  "@zenbujs/core": "^0.0.20",
@@ -0,0 +1,7 @@
1
+ import { Service } from "@zenbujs/core/runtime"
2
+
3
+ export class CwdService extends Service.create({ key: "cwd" }) {
4
+ async get() {
5
+ return process.cwd()
6
+ }
7
+ }
@@ -27,7 +27,7 @@ function Home() {
27
27
  className="bg-indigo-600 hover:bg-indigo-700 transition text-white font-semibold px-4 py-2 rounded text-sm"
28
28
  onClick={async () => {
29
29
  setCopied(false)
30
- setCwd(await rpc.app.repo.getCwd())
30
+ setCwd(await rpc.app.cwd.get())
31
31
  }}
32
32
  >
33
33
  Get cwd
@@ -8,7 +8,8 @@
8
8
  "build:source": "zen build:source",
9
9
  "build:electron": "zen build:electron",
10
10
  "publish:source": "zen publish:source",
11
- "link": "zen link"
11
+ "link": "zen link",
12
+ "db:generate": "zen db generate"
12
13
  },
13
14
  "dependencies": {
14
15
  "@zenbujs/core": "^0.0.20",
@@ -0,0 +1,7 @@
1
+ import { Service } from "@zenbujs/core/runtime"
2
+
3
+ export class CwdService extends Service.create({ key: "cwd" }) {
4
+ async get() {
5
+ return process.cwd()
6
+ }
7
+ }
@@ -27,7 +27,7 @@ function Home() {
27
27
  className="primary-button"
28
28
  onClick={async () => {
29
29
  setCopied(false)
30
- setCwd(await rpc.app.repo.getCwd())
30
+ setCwd(await rpc.app.cwd.get())
31
31
  }}
32
32
  >
33
33
  Get cwd
@@ -1,11 +0,0 @@
1
- import { Service } from "@zenbujs/core/runtime"
2
-
3
- /**
4
- * Sample RPC service. Methods on the class are callable from the renderer
5
- * via `useRpc()` — see `src/renderer/App.tsx`.
6
- */
7
- export class Repo extends Service.create({ key: "repo" }) {
8
- async getCwd() {
9
- return process.cwd()
10
- }
11
- }
@@ -1,11 +0,0 @@
1
- import { Service } from "@zenbujs/core/runtime"
2
-
3
- /**
4
- * Sample RPC service. Methods on the class are callable from the renderer
5
- * via `useRpc()` — see `src/renderer/App.tsx`.
6
- */
7
- export class Repo extends Service.create({ key: "repo" }) {
8
- async getCwd() {
9
- return process.cwd()
10
- }
11
- }