create-zenbu-app 0.0.2 → 0.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zenbu-app",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Scaffold a new Zenbu app",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -12,7 +12,7 @@
12
12
  "db:generate": "zen db generate"
13
13
  },
14
14
  "dependencies": {
15
- "@zenbujs/core": "^0.0.1",
15
+ "@zenbujs/core": "0.0.5",
16
16
  "@vitejs/plugin-react": "^5.0.0",
17
17
  "react": "^19.0.0",
18
18
  "react-dom": "^19.0.0",
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="zenbu-bg" content="#111">
6
+ <style>
7
+ html, body {
8
+ height: 100%;
9
+ margin: 0;
10
+ padding: 0;
11
+ background: #111;
12
+ }
13
+ @media (prefers-color-scheme: dark) {
14
+ html, body {
15
+ background: #111;
16
+ }
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ </body>
22
+ </html>
@@ -0,0 +1,52 @@
1
+ import {
2
+ defineConfig,
3
+ definePlugin,
4
+ defineBuildConfig,
5
+ stripIfDisabled,
6
+ dropFiles,
7
+ } from "@zenbujs/core/config";
8
+
9
+ export default defineConfig({
10
+ // Where the kyju database lives (relative to this file).
11
+ db: "./.zenbu/db",
12
+
13
+ // Boot-window HTML. The single ui entrypoint for the whole app.
14
+ uiEntrypoint: "./src/renderer",
15
+
16
+ // Plugins are pure main-process: services + optional schema/preload/events.
17
+ // The "host plugin" is just the first entry by convention.
18
+ plugins: [
19
+ definePlugin({
20
+ name: "app",
21
+ services: ["./src/main/services/*.ts"],
22
+ }),
23
+ ],
24
+
25
+ // Build pipeline for `zen build:source` (mirror staging) and
26
+ // `zen build:electron` (signed .app via electron-builder). Set
27
+ // `mirror.target` to "<owner>/<repo>" before shipping.
28
+ build: defineBuildConfig({
29
+ source: ".",
30
+ out: ".zenbu/build/source",
31
+ include: [
32
+ "src/**/*",
33
+ "package.json",
34
+ "pnpm-lock.yaml",
35
+ "tsconfig.json",
36
+ "zenbu.config.ts",
37
+ "vite.config.ts",
38
+ ],
39
+ ignore: [
40
+ "src/**/*.test.ts",
41
+ "src/**/*.test.tsx",
42
+ "src/**/*.spec.ts",
43
+ "src/**/*.spec.tsx",
44
+ "src/dev-only/**",
45
+ ],
46
+ transforms: [
47
+ stripIfDisabled({ FLAG_BETA: false }),
48
+ dropFiles(/\.stories\.tsx?$/),
49
+ ],
50
+ // mirror: { target: "{{owner}}/{{repo}}", branch: "main" },
51
+ }),
52
+ });
@@ -1,6 +0,0 @@
1
- {
2
- "db": "./.zenbu/db",
3
- "plugins": [
4
- "zenbu.plugin.json"
5
- ]
6
- }
@@ -1,50 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <style>
6
- * { margin: 0; padding: 0; box-sizing: border-box; }
7
- html, body { height: 100%; overflow: hidden; }
8
- body {
9
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
10
- background: #F4F4F4;
11
- -webkit-app-region: drag;
12
- user-select: none;
13
- padding: 52px 48px 32px;
14
- display: flex;
15
- flex-direction: column;
16
- gap: 16px;
17
- }
18
- @media (prefers-color-scheme: dark) {
19
- body { background: #1a1a1a; }
20
- .skeleton { background: #2a2a2a; }
21
- .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent); }
22
- }
23
- .skeleton {
24
- background: #e5e5e5;
25
- border-radius: 6px;
26
- position: relative;
27
- overflow: hidden;
28
- }
29
- .skeleton::after {
30
- content: "";
31
- position: absolute;
32
- inset: 0;
33
- background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
34
- animation: shimmer 1.5s infinite;
35
- }
36
- @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
37
- .title { height: 28px; width: 35%; }
38
- .line { height: 14px; }
39
- .line:nth-child(2) { width: 90%; }
40
- .line:nth-child(3) { width: 70%; }
41
- .line:nth-child(4) { width: 80%; }
42
- </style>
43
- </head>
44
- <body>
45
- <div class="skeleton title"></div>
46
- <div class="skeleton line"></div>
47
- <div class="skeleton line"></div>
48
- <div class="skeleton line"></div>
49
- </body>
50
- </html>
@@ -1,43 +0,0 @@
1
- import { defineBuildConfig, stripIfDisabled, dropFiles } from "@zenbujs/core/build";
2
-
3
- /**
4
- * Build pipeline for `zen build:source` and `zen build:electron`.
5
- *
6
- * Edit `include`/`ignore` to choose what gets shipped to the mirror repo and
7
- * seeded inside the .app. Add transforms to strip feature-flagged code,
8
- * drop test files, etc.
9
- *
10
- * Set `mirror.target` to "<owner>/<repo>" (a GitHub repo) to enable
11
- * `zen publish:source init` / `zen publish:source push`.
12
- */
13
- export default defineBuildConfig({
14
- source: ".",
15
- out: ".zenbu/build/seed",
16
-
17
- include: [
18
- "src/**/*",
19
- "package.json",
20
- "pnpm-lock.yaml",
21
- "tsconfig.json",
22
- "zenbu.plugin.json",
23
- "config.json",
24
- "db/**",
25
- "db.config.ts",
26
- "vite.config.ts",
27
- "loading.html",
28
- ],
29
- ignore: [
30
- "src/**/*.test.ts",
31
- "src/**/*.test.tsx",
32
- "src/**/*.spec.ts",
33
- "src/**/*.spec.tsx",
34
- "src/dev-only/**",
35
- ],
36
-
37
- transforms: [
38
- stripIfDisabled({ FLAG_BETA: false }),
39
- dropFiles(/\.stories\.tsx?$/),
40
- ],
41
-
42
- // mirror: { target: "{{owner}}/{{repo}}", branch: "main" },
43
- });
@@ -1,7 +0,0 @@
1
- {
2
- "name": "app",
3
- "uiEntrypoint": "src/renderer",
4
- "services": [
5
- "src/main/services/*.ts"
6
- ]
7
- }