File tree Expand file tree Collapse file tree
crates/vite_global_cli/src
command-install-auto-create-package-json Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1538,7 +1538,7 @@ pub async fn run_command_with_options(
15381538 packages,
15391539 pass_through_args,
15401540 } => {
1541- print_runtime_header ( render_options. show_header ) ;
1541+ print_runtime_header ( render_options. show_header && !silent ) ;
15421542 // If packages are provided, redirect to Add command
15431543 if let Some ( pkgs) = packages
15441544 && !pkgs. is_empty ( )
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ fn all() -> &'static [&'static dyn Tip] {
7979/// - The `VITE_PLUS_CLI_TEST` env var is set (test mode)
8080/// - No tips match the given context
8181pub fn get_tip ( context : & TipContext ) -> Option < & ' static str > {
82- if std:: env:: var_os ( "VITE_PLUS_CLI_TEST" ) . is_some ( ) {
82+ if std:: env:: var_os ( "VITE_PLUS_CLI_TEST" ) . is_some ( ) || std :: env :: var_os ( "CI" ) . is_some ( ) {
8383 return None ;
8484 }
8585
Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ exec "`$VITE_PLUS_HOME/current/bin/vp.exe" "`$@"
390390 Write-Host " ${BRIGHT_BLUE} vp create${NC} Create a new project"
391391 Write-Host " ${BRIGHT_BLUE} vp env${NC} Manage Node.js versions"
392392 Write-Host " ${BRIGHT_BLUE} vp install${NC} Install dependencies"
393- Write-Host " ${BRIGHT_BLUE} vp dev ${NC} Start dev server "
393+ Write-Host " ${BRIGHT_BLUE} vp migrate ${NC} Migrate to Vite+ "
394394
395395 # Show Node.js manager status
396396 if ($nodeManagerResult -eq " true" -or $nodeManagerResult -eq " already" ) {
@@ -400,7 +400,7 @@ exec "`$VITE_PLUS_HOME/current/bin/vp.exe" "`$@"
400400 }
401401
402402 Write-Host " "
403- Write-Host " Run ${BRIGHT_BLUE} vp help${NC} for more information ."
403+ Write-Host " Run ${BRIGHT_BLUE} vp help${NC} to see available commands ."
404404
405405 # Show note if PATH was updated
406406 if ($pathResult -eq " true" ) {
Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ WRAPPER_EOF
613613 echo -e " ${BRIGHT_BLUE} vp create${NC} Create a new project"
614614 echo -e " ${BRIGHT_BLUE} vp env${NC} Manage Node.js versions"
615615 echo -e " ${BRIGHT_BLUE} vp install${NC} Install dependencies"
616- echo -e " ${BRIGHT_BLUE} vp dev ${NC} Start dev server "
616+ echo -e " ${BRIGHT_BLUE} vp migrate ${NC} Migrate to Vite+ "
617617
618618 if [ " $NODE_MANAGER_ENABLED " = " true" ] || [ " $NODE_MANAGER_ENABLED " = " already" ]; then
619619 echo " "
@@ -622,7 +622,7 @@ WRAPPER_EOF
622622 fi
623623
624624 echo " "
625- echo -e " Run ${BRIGHT_BLUE} vp help${NC} for more information ."
625+ echo -e " Run ${BRIGHT_BLUE} vp help${NC} to see available commands ."
626626
627627 # Show restart note if PATH was added to shell config
628628 if [ " $PATH_CONFIGURED " = " true" ] && [ -n " $SHELL_CONFIG_UPDATED " ]; then
Original file line number Diff line number Diff line change 22no package.json
33
44> vp install --silent && cat package.json # should auto-create package.json and install
5- VITE+ - The Unified Toolchain for the Web
6-
75{
86 "type": "module",
97 "packageManager": "pnpm@<semver>"
Original file line number Diff line number Diff line change 11> vp install --no-frozen-lockfile --silent # install dependencies work
2- VITE+ - The Unified Toolchain for the Web
3-
4-
52> mkdir -p packages/sub-project && echo '{"name": "sub-project", "dependencies": { "testnpm2": "1.0.0" }}' > packages/sub-project/package.json # create sub project and package.json
63> vp install --no-frozen-lockfile --silent # install again should work and without cache
7- VITE+ - The Unified Toolchain for the Web
8-
9-
104> ls packages/sub-project/node_modules/testnpm2/package.json # check testnpm2 is installed
115packages/sub-project/node_modules/testnpm2/package.json
126
137> mkdir -p others/other && echo '{"name": "other", "dependencies": { "testnpm2": "1.0.0" }}' > others/other/package.json # create non workspace project
148> vp install --no-frozen-lockfile --silent # should install cache hit
15- VITE+ - The Unified Toolchain for the Web
16-
17-
189> test -d others/other/node_modules/testnpm2 && echo 'Error: directory exists.' >&2 && exit 1 || true # check testnpm2 is not installed
1910> rm -rf packages/sub-project # remove sub project
20- > vp install --no-frozen-lockfile --silent | sed -E 's|packages.*|packages*|' # should install again without cache
21- VITE+ - The Unified Toolchain for the Web
22-
11+ > vp install --no-frozen-lockfile --silent | sed -E 's|packages.*|packages*|' # should install again without cache
You can’t perform that action at this time.
0 commit comments