create-interview-cockpit 0.1.0 → 0.1.1
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/index.js +13 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
import path from "path";
|
|
5
5
|
import readline from "readline";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
|
+
import { execSync } from "child_process";
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
10
|
const __dirname = path.dirname(__filename);
|
|
@@ -159,11 +160,20 @@ async function runCreate() {
|
|
|
159
160
|
|
|
160
161
|
rl.close();
|
|
161
162
|
|
|
163
|
+
// ── 3. Install dependencies ───────────────────────────
|
|
164
|
+
console.log(" Installing dependencies (this may take a minute)…");
|
|
165
|
+
const installDirs = [targetDir, path.join(targetDir, "client"), path.join(targetDir, "server")];
|
|
166
|
+
for (const dir of installDirs) {
|
|
167
|
+
const label = path.relative(path.dirname(targetDir), dir) || projectName;
|
|
168
|
+
process.stdout.write(` Installing ${label}/… `);
|
|
169
|
+
execSync("npm install", { cwd: dir, stdio: "ignore" });
|
|
170
|
+
process.stdout.write("✔\n");
|
|
171
|
+
}
|
|
172
|
+
|
|
162
173
|
console.log("");
|
|
163
174
|
console.log(" ✔ Done! Get started:");
|
|
164
175
|
console.log("");
|
|
165
176
|
console.log(` cd ${projectName}`);
|
|
166
|
-
console.log(" npm install");
|
|
167
177
|
console.log(" npm run dev");
|
|
168
178
|
console.log("");
|
|
169
179
|
console.log(" The app opens at http://localhost:5173");
|
|
@@ -281,8 +291,8 @@ async function runUpgrade() {
|
|
|
281
291
|
console.log("");
|
|
282
292
|
console.log(` ✔ Upgraded to v${CLI_VERSION}!`);
|
|
283
293
|
console.log("");
|
|
284
|
-
console.log(" Run npm install
|
|
285
|
-
console.log(" then npm run dev to start.");
|
|
294
|
+
console.log(" Run npm install in the root, client/, and server/ directories");
|
|
295
|
+
console.log(" to pick up any dependency changes, then npm run dev to start.");
|
|
286
296
|
console.log("");
|
|
287
297
|
}
|
|
288
298
|
|