Skip to content

Commit 12108b2

Browse files
authored
fix: Replace cd with location info in monorepo when using vite new. (#455)
1 parent 197399a commit 12108b2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

packages/global/src/new/bin.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,14 +573,19 @@ Use \`vite new --list\` to list all available templates, or run \`vite new --hel
573573
console.log(` ${gray('•')} Created: ${green(projectDir)}`);
574574

575575
// Show next steps
576-
showNextSteps(projectDir);
576+
showNextSteps(projectDir, isMonorepo);
577577
// #endregion
578578
}
579579

580-
function showNextSteps(projectDir: string) {
580+
function showNextSteps(projectDir: string, isMonorepo: boolean) {
581581
console.log(`\n${gray('Next steps:')}`);
582-
console.log(` ${cyan(`cd ${projectDir}`)}`);
583-
console.log(` ${cyan('vite run dev')}`);
582+
if (isMonorepo) {
583+
console.log(` ${gray('Installed in')} ${green(projectDir)}`);
584+
console.log(` ${cyan(`vite dev ${projectDir}`)}`);
585+
} else {
586+
console.log(` ${cyan(`cd ${projectDir}`)}`);
587+
console.log(` ${cyan('vite dev')}`);
588+
}
584589
console.log('');
585590
}
586591

0 commit comments

Comments
 (0)