docs: add manual package-manager install path for vp#1116
docs: add manual package-manager install path for vp#1116yash27-lab wants to merge 2 commits intovoidzero-dev:mainfrom
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Opened a PR for this: This adds a manual package-manager install path for I also verified the npm/pnpm install and upgrade commands in isolated temp environments and ran the docs build successfully. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1d31c4adc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
docs/guide/index.md
Outdated
|
|
||
| - It does not modify your shell profile for you. | ||
| - It does not automatically create the `node`, `npm`, and `npx` shims in `VITE_PLUS_HOME/bin`. | ||
| - If you want Vite+ to manage those shims after installing, run `vp env setup`. |
There was a problem hiding this comment.
Remove the
vp env setup follow-up for package-manager installs
Following this bullet after npm install -g vite-plus/pnpm add -g vite-plus creates ~/.vite-plus/bin/vp and the node/npm/npx shims via setup_vp_wrapper()/create_unix_shim() in crates/vite_global_cli/src/commands/env/setup.rs, and all of them point at ../current/bin/vp. A package-manager install never creates VITE_PLUS_HOME/current; that only happens in the installer/upgrade flow (packages/cli/install.sh and swap_current_link() in crates/vite_global_cli/src/commands/upgrade/install.rs). If a user follows this advice and then adds ~/.vite-plus/bin to PATH, vp becomes a broken shim.
Useful? React with 👍 / 👎.
docs/guide/index.md
Outdated
| This installation path is more manual than the install script: | ||
|
|
||
| - It does not modify your shell profile for you. | ||
| - It does not automatically create the `node`, `npm`, and `npx` shims in `VITE_PLUS_HOME/bin`. |
There was a problem hiding this comment.
Warn that
vp implode won't uninstall npm/pnpm installs
Now that this section documents npm/pnpm as a supported global install path, the caveats also need to say that vp implode does not remove that installation. execute() in crates/vite_global_cli/src/commands/implode.rs only deletes VITE_PLUS_HOME and cleans shell-profile snippets, so an npm/pnpm-owned vp binary remains on PATH until the user runs the matching package-manager uninstall command. Without that warning, the cleanup guidance on this page becomes incorrect for users who choose the new install method.
Useful? React with 👍 / 👎.
|
|
||
| ### Install with npm or pnpm | ||
|
|
||
| If you prefer not to pipe a remote script into your shell, you can install the published `vite-plus` package globally with a package manager instead: |
There was a problem hiding this comment.
the vp cli from vite-plus's package we call it Local CLI. It is not recommended to install this Local CLI globally through a package manager, as its features differ from those of the Global CLI, such as the lack of node runtime manager(e.g.: vp env command is missing) and package manager functionalities.
There was a problem hiding this comment.
Thanks, that makes sense.
I misunderstood the published vite-plus package as a supported global installation path for the full vp CLI. I’ll avoid documenting it that way.
Would you prefer this PR to be reshaped to clarify that:
- the install script is the supported way to install the global
vpCLI - the published
vite-pluspackage is the project-local CLI and should not be installed globally
Summary
Add a manual package-manager-based installation path for
vpto the docs.Changes
npm install -g vite-plusandpnpm add -g vite-plusto/guide/PATH,pnpm setup,vp env setup, andvp env off/guide/upgradeVerification
mainnpm install -g vite-plusin an isolated temp prefixpnpm add -g vite-plusin an isolated temp global environmentnpm install -g vite-plus@latestpnpm add -g vite-plus@latestcd docs && pnpm install && pnpm build