create-kofi-stack 2.0.7 → 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.
Files changed (2) hide show
  1. package/dist/index.js +26 -22
  2. 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;
@@ -323,7 +343,12 @@ async function writeNodeToDisk(node, targetDir) {
323
343
  }
324
344
 
325
345
  // src/index.ts
326
- var VERSION = "2.0.0";
346
+ import { readFileSync } from "fs";
347
+ import { fileURLToPath } from "url";
348
+ import { dirname, join } from "path";
349
+ var __dirname = dirname(fileURLToPath(import.meta.url));
350
+ var pkg = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
351
+ var VERSION = pkg.version;
327
352
  var kofiGradient = gradient(["#FF6B6B", "#4ECDC4", "#FFE66D"]);
328
353
  function displayBanner() {
329
354
  console.log();
@@ -350,7 +375,6 @@ program.name("create-kofi-stack").description("Scaffold opinionated full-stack p
350
375
  try {
351
376
  const config = await runPrompts(projectName, options);
352
377
  await generateProject(config);
353
- displaySuccessMessage(config.projectName);
354
378
  } catch (error) {
355
379
  if (error instanceof Error && error.message === "cancelled") {
356
380
  p3.cancel("Operation cancelled");
@@ -360,24 +384,4 @@ program.name("create-kofi-stack").description("Scaffold opinionated full-stack p
360
384
  process.exit(1);
361
385
  }
362
386
  });
363
- function displaySuccessMessage(projectName) {
364
- console.log();
365
- p3.outro(pc3.green("Project created successfully!"));
366
- console.log();
367
- console.log(pc3.bold("Next steps:"));
368
- console.log();
369
- console.log(` ${pc3.cyan("cd")} ${projectName}`);
370
- console.log(` ${pc3.cyan("pnpm")} dev`);
371
- console.log();
372
- console.log(pc3.dim("This will automatically:"));
373
- console.log(pc3.dim(" - Install dependencies"));
374
- console.log(pc3.dim(" - Guide you through Convex setup"));
375
- console.log(pc3.dim(" - Start Next.js and Convex dev servers"));
376
- console.log();
377
- console.log(pc3.bold("Documentation:"));
378
- console.log(` ${pc3.dim("-")} Convex: ${pc3.cyan("https://docs.convex.dev")}`);
379
- console.log(` ${pc3.dim("-")} Better-Auth: ${pc3.cyan("https://www.better-auth.com")}`);
380
- console.log(` ${pc3.dim("-")} shadcn/ui: ${pc3.cyan("https://ui.shadcn.com")}`);
381
- console.log();
382
- }
383
387
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kofi-stack",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
5
5
  "type": "module",
6
6
  "bin": {