@zappdev/cli 0.5.0-alpha.3 → 0.5.0-alpha.5
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 +1 -1
- package/src/init.ts +11 -9
package/package.json
CHANGED
package/src/init.ts
CHANGED
|
@@ -21,13 +21,15 @@ export async function runInit(opts: InitOptions) {
|
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// 1.
|
|
24
|
+
// 1. Scaffold Vite project files (no install, no dev server).
|
|
25
|
+
// create-vite has an --immediate flag that auto-installs + starts the dev
|
|
26
|
+
// server, and an interactive prompt that does the same if confirmed.
|
|
27
|
+
// --no-interactive skips the prompt and defaults to no install.
|
|
25
28
|
process.stdout.write(`[zapp] creating ${name} with template ${template}...\n`);
|
|
26
|
-
const viteProc = Bun.spawn(
|
|
27
|
-
|
|
28
|
-
stdout: "inherit",
|
|
29
|
-
|
|
30
|
-
});
|
|
29
|
+
const viteProc = Bun.spawn(
|
|
30
|
+
["bunx", "create-vite@latest", name, "--template", template, "--no-interactive"],
|
|
31
|
+
{ cwd: root, stdout: "inherit", stderr: "inherit" },
|
|
32
|
+
);
|
|
31
33
|
if ((await viteProc.exited) !== 0) {
|
|
32
34
|
process.stderr.write("[zapp] vite scaffold failed\n");
|
|
33
35
|
process.exit(1);
|
|
@@ -123,12 +125,12 @@ fn main() -> int {
|
|
|
123
125
|
|
|
124
126
|
pkgObj.dependencies = {
|
|
125
127
|
...(pkgObj.dependencies ?? {}),
|
|
126
|
-
"@zappdev/runtime": "^0.5.0",
|
|
128
|
+
"@zappdev/runtime": "^0.5.0-alpha.0",
|
|
127
129
|
};
|
|
128
130
|
pkgObj.devDependencies = {
|
|
129
131
|
...(pkgObj.devDependencies ?? {}),
|
|
130
|
-
"@zappdev/cli": "^0.5.0",
|
|
131
|
-
"@zappdev/vite": "^0.5.0",
|
|
132
|
+
"@zappdev/cli": "^0.5.0-alpha.0",
|
|
133
|
+
"@zappdev/vite": "^0.5.0-alpha.0",
|
|
132
134
|
};
|
|
133
135
|
|
|
134
136
|
await Bun.write(pkgPath, JSON.stringify(pkgObj, null, 2));
|