create-airjam 0.1.3 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { program } from "commander";
5
+ import { execSync } from "child_process";
5
6
  import fs from "fs-extra";
6
7
  import kleur from "kleur";
7
8
  import path from "path";
@@ -83,11 +84,24 @@ Creating project in ${targetDir}...
83
84
  await fs.writeJson(pkgPath, pkg, { spaces: 2 });
84
85
  }
85
86
  console.log(kleur.green("\u2713 Project created successfully!\n"));
87
+ console.log(kleur.cyan("Installing dependencies...\n"));
88
+ try {
89
+ execSync("pnpm install", {
90
+ cwd: targetDir,
91
+ stdio: "inherit"
92
+ });
93
+ console.log(kleur.green("\n\u2713 Dependencies installed successfully!\n"));
94
+ } catch (error) {
95
+ console.log(
96
+ kleur.yellow(
97
+ "\n\u26A0 Failed to install dependencies automatically. Please run 'pnpm install' manually.\n"
98
+ )
99
+ );
100
+ }
86
101
  console.log("Next steps:\n");
87
102
  console.log(kleur.cyan(` cd ${projectName}`));
88
- console.log(kleur.cyan(" pnpm install"));
89
- console.log(kleur.cyan(" cp env.example .env"));
90
- console.log(kleur.cyan(" # Edit .env and set AIR_JAM_MASTER_KEY"));
103
+ console.log(kleur.cyan(" cp .env.example .env"));
104
+ console.log(kleur.cyan(" # Edit .env and set AIR_JAM_MASTER_KEY (optional for local dev)"));
91
105
  console.log(kleur.cyan(" pnpm run dev:server # Terminal 1 - Start server"));
92
106
  console.log(kleur.cyan(" pnpm run dev # Terminal 2 - Start game"));
93
107
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-airjam",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI to scaffold Air Jam game projects",
5
5
  "type": "module",
6
6
  "license": "MIT",