create-kofi-stack 2.0.8 → 2.0.9
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/dist/index.js +20 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -290,6 +290,26 @@ async function generateProject(config) {
|
|
|
290
290
|
console.log();
|
|
291
291
|
p2.log.info(`Run ${pc2.cyan("pnpm dev:setup")} when you're ready to configure Convex`);
|
|
292
292
|
}
|
|
293
|
+
console.log();
|
|
294
|
+
const openInIDE = await p2.confirm({
|
|
295
|
+
message: "Would you like to open the project in VS Code?",
|
|
296
|
+
initialValue: true
|
|
297
|
+
});
|
|
298
|
+
if (!p2.isCancel(openInIDE) && openInIDE) {
|
|
299
|
+
try {
|
|
300
|
+
await execa("code", [config.targetDir], { stdio: "pipe" });
|
|
301
|
+
p2.log.success("Opened in VS Code");
|
|
302
|
+
} catch {
|
|
303
|
+
p2.log.warn('Could not open VS Code. Make sure "code" command is in your PATH.');
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
console.log();
|
|
307
|
+
p2.log.success(`Project ${pc2.cyan(config.projectName)} created successfully!`);
|
|
308
|
+
console.log();
|
|
309
|
+
p2.log.message(`${pc2.dim("To get started:")}`);
|
|
310
|
+
p2.log.message(` ${pc2.cyan(`cd ${config.projectName}`)}`);
|
|
311
|
+
p2.log.message(` ${pc2.cyan("pnpm dev")}`);
|
|
312
|
+
console.log();
|
|
293
313
|
} catch (error) {
|
|
294
314
|
spinner.fail("An error occurred during project generation");
|
|
295
315
|
throw error;
|
|
@@ -355,7 +375,6 @@ program.name("create-kofi-stack").description("Scaffold opinionated full-stack p
|
|
|
355
375
|
try {
|
|
356
376
|
const config = await runPrompts(projectName, options);
|
|
357
377
|
await generateProject(config);
|
|
358
|
-
displaySuccessMessage(config.projectName);
|
|
359
378
|
} catch (error) {
|
|
360
379
|
if (error instanceof Error && error.message === "cancelled") {
|
|
361
380
|
p3.cancel("Operation cancelled");
|
|
@@ -365,24 +384,4 @@ program.name("create-kofi-stack").description("Scaffold opinionated full-stack p
|
|
|
365
384
|
process.exit(1);
|
|
366
385
|
}
|
|
367
386
|
});
|
|
368
|
-
function displaySuccessMessage(projectName) {
|
|
369
|
-
console.log();
|
|
370
|
-
p3.outro(pc3.green("Project created successfully!"));
|
|
371
|
-
console.log();
|
|
372
|
-
console.log(pc3.bold("Next steps:"));
|
|
373
|
-
console.log();
|
|
374
|
-
console.log(` ${pc3.cyan("cd")} ${projectName}`);
|
|
375
|
-
console.log(` ${pc3.cyan("pnpm")} dev`);
|
|
376
|
-
console.log();
|
|
377
|
-
console.log(pc3.dim("This will automatically:"));
|
|
378
|
-
console.log(pc3.dim(" - Install dependencies"));
|
|
379
|
-
console.log(pc3.dim(" - Guide you through Convex setup"));
|
|
380
|
-
console.log(pc3.dim(" - Start Next.js and Convex dev servers"));
|
|
381
|
-
console.log();
|
|
382
|
-
console.log(pc3.bold("Documentation:"));
|
|
383
|
-
console.log(` ${pc3.dim("-")} Convex: ${pc3.cyan("https://docs.convex.dev")}`);
|
|
384
|
-
console.log(` ${pc3.dim("-")} Better-Auth: ${pc3.cyan("https://www.better-auth.com")}`);
|
|
385
|
-
console.log(` ${pc3.dim("-")} shadcn/ui: ${pc3.cyan("https://ui.shadcn.com")}`);
|
|
386
|
-
console.log();
|
|
387
|
-
}
|
|
388
387
|
program.parse();
|