Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ After installation, open a new shell and run:
vp help
```

### 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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vp CLI
  • the published vite-plus package is the project-local CLI and should not be installed globally


```bash
npm install -g vite-plus
# or
pnpm add -g vite-plus
```

After installing, open a new shell and run `vp help`.

If your shell cannot find `vp`, make sure your package manager's global bin directory is on your `PATH`. For `pnpm`, you may need to run `pnpm setup` first.

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`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

- If you want Vite+ to manage those shims after installing, run `vp env setup`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

- If you want to keep your system Node.js first, run `vp env off`.

::: info
Vite+ will manage your global Node.js runtime and package manager. If you'd like to opt out of this behavior, run `vp env off`. If you realize Vite+ is not for you, type `vp implode`, but please [share your feedback with us](https://discord.gg/cAnsqHh5PX).
:::
Expand Down
7 changes: 7 additions & 0 deletions docs/guide/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ You can upgrade both of them independently.
vp upgrade
```

If you installed `vite-plus` globally with npm or pnpm instead of the install script, update it with the same package manager:

```bash
npm install -g vite-plus@latest
pnpm add -g vite-plus@latest
```

## Local `vite-plus`

Update the project dependency with the package manager commands in Vite+:
Expand Down
Loading