create-izi-noir 0.2.7 → 0.2.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 +13 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { Command } from "commander";
5
5
 
6
6
  // src/commands/init.ts
7
7
  import path2 from "path";
8
- import { execSync } from "child_process";
8
+ import { execSync, spawn } from "child_process";
9
9
  import pc3 from "picocolors";
10
10
 
11
11
  // src/prompts/project.ts
@@ -2636,11 +2636,21 @@ Error: Directory "${projectOptions.projectName}" already exists and is not empty
2636
2636
  }
2637
2637
  }
2638
2638
  if (!projectOptions.skipInstall) {
2639
- console.log(pc3.dim(" Starting npm install..."));
2640
2639
  const installProgress = createInstallProgress();
2641
2640
  installProgress.start();
2642
2641
  try {
2643
- execSync("npm install", { cwd: projectDir, stdio: "ignore" });
2642
+ await new Promise((resolve, reject) => {
2643
+ const child = spawn("npm", ["install"], {
2644
+ cwd: projectDir,
2645
+ stdio: "ignore",
2646
+ shell: true
2647
+ });
2648
+ child.on("close", (code) => {
2649
+ if (code === 0) resolve();
2650
+ else reject(new Error(`npm install exited with code ${code}`));
2651
+ });
2652
+ child.on("error", reject);
2653
+ });
2644
2654
  installProgress.stop(true);
2645
2655
  } catch {
2646
2656
  installProgress.stop(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-izi-noir",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "CLI to scaffold IZI-NOIR ZK projects",
5
5
  "type": "module",
6
6
  "bin": {