fix: dependency installation output flow

This commit is contained in:
Aman Varshney
2025-02-14 13:02:41 +05:30
parent 1841c7d836
commit f73c7d2064
7 changed files with 31 additions and 10875 deletions

View File

@@ -23,8 +23,7 @@
"commander": "^13.1.0",
"execa": "^8.0.1",
"fs-extra": "^11.2.0",
"gradient-string": "^3.0.0",
"ora": "^7.0.1"
"gradient-string": "^3.0.0"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",

View File

@@ -64,10 +64,9 @@ export async function createProject(options: ProjectConfig) {
if (shouldInstallDeps) {
s.start(`📦 Installing dependencies using ${options.packageManager}...`);
try {
const { stdout } = await $({
await $({
cwd: projectDir,
})`${options.packageManager} install`;
log.step(stdout);
s.stop("✅ Dependencies installed successfully");
} catch (error) {
s.stop("Failed to install dependencies");
@@ -78,7 +77,6 @@ export async function createProject(options: ProjectConfig) {
}
}
log.success("✨ Project created successfully!\n");
log.info(`${chalk.dim("Next steps:")}
cd ${options.projectName}${!shouldInstallDeps ? `\n${options.packageManager} install` : ""}
${options.packageManager === "npm" ? "npm run" : options.packageManager} dev`);

View File

@@ -131,6 +131,7 @@ async function gatherConfig(
hint: "Search engine optimization configuration",
},
],
required: false,
}),
git: () =>
flags.git !== undefined