create-tauri-ui 1.0.6 → 1.1.0
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 +57 -16
- package/assets/debug-panel/debug-panel.tsx.tmpl +647 -59
- package/dist/index.mjs +89 -78
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -33,9 +33,12 @@ bunx tauri icon app-icon.png
|
|
|
33
33
|
## CLI reference
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
Usage:
|
|
36
|
+
Usage:
|
|
37
|
+
create-tauri-ui [target-dir] [options] scaffold a new project
|
|
38
|
+
create-tauri-ui <add|update|remove> <battery> manage batteries in an existing project
|
|
39
|
+
create-tauri-ui list list batteries + install status
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
Scaffold options:
|
|
39
42
|
-t, --template <name> vite | next | start | react-router | astro
|
|
40
43
|
--identifier <value> Tauri app identifier (e.g. com.example.myapp)
|
|
41
44
|
--preset <value> shadcn preset (default: b0)
|
|
@@ -47,30 +50,65 @@ Options:
|
|
|
47
50
|
--no-invoke-example skip the Rust invoke example
|
|
48
51
|
--workflow include the GitHub release workflow
|
|
49
52
|
--no-workflow skip the GitHub release workflow
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
Manage options:
|
|
55
|
+
--dir <path> project directory (default: current working dir)
|
|
56
|
+
--target-os <list> comma-separated platforms for workflow
|
|
57
|
+
(windows-latest,macos-latest,ubuntu-latest)
|
|
58
|
+
-f, --force overwrite an existing target directory / battery
|
|
59
|
+
-y, --yes accept defaults / skip confirmations
|
|
52
60
|
-v, --version display version
|
|
53
61
|
-h, --help display help
|
|
62
|
+
|
|
63
|
+
Batteries: debug-panel, workflow
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Managing batteries in an existing project
|
|
67
|
+
|
|
68
|
+
Run inside a scaffolded project to install, update, or remove a battery after the fact.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# see which batteries are installed
|
|
72
|
+
bunx create-tauri-ui@latest list
|
|
73
|
+
|
|
74
|
+
# upgrade the debug panel to the latest template
|
|
75
|
+
bunx create-tauri-ui@latest update debug-panel
|
|
76
|
+
|
|
77
|
+
# add the release workflow later
|
|
78
|
+
bunx create-tauri-ui@latest add workflow --target-os macos-latest,ubuntu-latest
|
|
79
|
+
|
|
80
|
+
# remove it
|
|
81
|
+
bunx create-tauri-ui@latest remove workflow
|
|
54
82
|
```
|
|
55
83
|
|
|
84
|
+
`update` re-applies the battery using the latest CLI templates. Patches are idempotent — existing mounts, imports, and plugin registrations are preserved. Commit first, then run `update` and inspect the diff.
|
|
85
|
+
|
|
86
|
+
`remove` deletes the battery's owned files and best-effort reverts any wiring. For batteries with external dependencies (like the debug panel's `tauri-plugin-log` + `@tauri-apps/plugin-log`), the CLI prints a manual cleanup checklist.
|
|
87
|
+
|
|
88
|
+
The template is auto-detected from `package.json` and project structure — no manifest file is written to your repo.
|
|
89
|
+
|
|
56
90
|
## Examples
|
|
57
91
|
|
|
58
92
|
**Vite app with all defaults:**
|
|
93
|
+
|
|
59
94
|
```bash
|
|
60
95
|
npm create tauri-ui@latest my-app -- --template vite --yes
|
|
61
96
|
```
|
|
62
97
|
|
|
63
98
|
**Next.js app, no dashboard, no workflow:**
|
|
99
|
+
|
|
64
100
|
```bash
|
|
65
101
|
npm create tauri-ui@latest my-app -- --template next --yes --no-starter --no-workflow
|
|
66
102
|
```
|
|
67
103
|
|
|
68
104
|
**Astro app with a custom bundle identifier:**
|
|
105
|
+
|
|
69
106
|
```bash
|
|
70
107
|
bun create tauri-ui my-app --template astro --identifier com.example.astroapp --yes
|
|
71
108
|
```
|
|
72
109
|
|
|
73
110
|
**Vite app with size-optimized release binary:**
|
|
111
|
+
|
|
74
112
|
```bash
|
|
75
113
|
bun create tauri-ui my-app --template vite --size-optimize --yes
|
|
76
114
|
```
|
|
@@ -93,21 +131,21 @@ Every generated project gets:
|
|
|
93
131
|
|
|
94
132
|
**Optional** (prompted during scaffolding, or passed as flags):
|
|
95
133
|
|
|
96
|
-
| Battery
|
|
97
|
-
|
|
98
|
-
| Starter dashboard
|
|
99
|
-
| Rust invoke example
|
|
100
|
-
| Size optimization
|
|
101
|
-
| GitHub release workflow | `--workflow` / `--no-workflow`
|
|
134
|
+
| Battery | Flag | Notes |
|
|
135
|
+
| ----------------------- | ------------------------------------------ | ------------------------------------------- |
|
|
136
|
+
| Starter dashboard | `--starter` / `--no-starter` | based on `dashboard-01` |
|
|
137
|
+
| Rust invoke example | `--invoke-example` / `--no-invoke-example` | |
|
|
138
|
+
| Size optimization | `--size-optimize` / `--no-size-optimize` | ~65% smaller release binary (9 MB → 3.1 MB) |
|
|
139
|
+
| GitHub release workflow | `--workflow` / `--no-workflow` | |
|
|
102
140
|
|
|
103
141
|
## Template status
|
|
104
142
|
|
|
105
|
-
| Template
|
|
106
|
-
|
|
107
|
-
| `vite`
|
|
108
|
-
| `next`
|
|
109
|
-
| `react-router`
|
|
110
|
-
| `astro`
|
|
143
|
+
| Template | Status |
|
|
144
|
+
| ------------------ | ----------------------------------------------- |
|
|
145
|
+
| `vite` | smoke-tested end to end |
|
|
146
|
+
| `next` | stable |
|
|
147
|
+
| `react-router` | stable |
|
|
148
|
+
| `astro` | stable |
|
|
111
149
|
| `start` (TanStack) | experimental — validate carefully after changes |
|
|
112
150
|
|
|
113
151
|
Scaffolding into `.` (current directory) is not supported yet.
|
|
@@ -145,12 +183,14 @@ bun run --cwd packages/create-tauri-ui start -- --help
|
|
|
145
183
|
## Testing
|
|
146
184
|
|
|
147
185
|
**Type check + build:**
|
|
186
|
+
|
|
148
187
|
```bash
|
|
149
188
|
bun run --cwd packages/create-tauri-ui check-types
|
|
150
189
|
bun run --cwd packages/create-tauri-ui build
|
|
151
190
|
```
|
|
152
191
|
|
|
153
192
|
**Single template smoke test:**
|
|
193
|
+
|
|
154
194
|
```bash
|
|
155
195
|
rm -rf /tmp/ctui-vite
|
|
156
196
|
node packages/create-tauri-ui/index.js /tmp/ctui-vite --template vite --yes --no-workflow
|
|
@@ -158,6 +198,7 @@ cd /tmp/ctui-vite && bun install && bun run build
|
|
|
158
198
|
```
|
|
159
199
|
|
|
160
200
|
**All templates:**
|
|
201
|
+
|
|
161
202
|
```bash
|
|
162
203
|
for template in vite next start react-router astro; do
|
|
163
204
|
dir="/tmp/create-tauri-ui-$template"
|