@configjs/cli 1.0.5 → 1.0.6
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/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import "./chunk-QGM4M3NI.js";
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
|
|
7
7
|
// package.json
|
|
8
|
-
var version = "1.0.
|
|
8
|
+
var version = "1.0.6";
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
11
|
var program = new Command();
|
|
@@ -13,7 +13,7 @@ program.name("confjs").description("Configure your frontend stack, instantly").v
|
|
|
13
13
|
program.command("react").description("Configure a React project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
|
|
14
14
|
async (options) => {
|
|
15
15
|
try {
|
|
16
|
-
const { installReact } = await import("./install-
|
|
16
|
+
const { installReact } = await import("./install-GBC5BFJA.js");
|
|
17
17
|
await installReact(options);
|
|
18
18
|
} catch (error) {
|
|
19
19
|
console.error("Error:", error);
|
|
@@ -600,21 +600,28 @@ var Installer = class {
|
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
603
|
+
const allPackagesToInstall = [...allDependencies, ...allDevDependencies];
|
|
604
|
+
if (allPackagesToInstall.length > 0) {
|
|
605
|
+
const depsToInstall = allDependencies;
|
|
606
|
+
const devDepsToInstall = allDevDependencies;
|
|
607
|
+
if (depsToInstall.length > 0) {
|
|
608
|
+
await installPackages(depsToInstall, {
|
|
609
|
+
packageManager: this.ctx.packageManager,
|
|
610
|
+
projectRoot: this.ctx.projectRoot,
|
|
611
|
+
dev: false,
|
|
612
|
+
silent: false
|
|
613
|
+
});
|
|
614
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
615
|
+
}
|
|
616
|
+
if (devDepsToInstall.length > 0) {
|
|
617
|
+
await installPackages(devDepsToInstall, {
|
|
618
|
+
packageManager: this.ctx.packageManager,
|
|
619
|
+
projectRoot: this.ctx.projectRoot,
|
|
620
|
+
dev: true,
|
|
621
|
+
silent: false
|
|
622
|
+
});
|
|
623
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
624
|
+
}
|
|
618
625
|
}
|
|
619
626
|
return results;
|
|
620
627
|
}
|