Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend global installation for Vendure CLI in Documentation #3313

Conversation

wpplumber
Copy link
Contributor

Description

This PR updates the installation instructions for the Vendure CLI. Previously, the documentation suggested installing the Vendure CLI locally in each project. However, I recommend installing the Vendure CLI globally to streamline the developer workflow and avoid redundant installations.

Key Changes:

Global Installation: Installing the Vendure CLI globally via npm install -g @vendure/cli eliminates the need to install it in each individual project. This makes the CLI available for use across all projects on the system, improving the developer experience.

Local Installation (Optional): Local installation instructions remain available for users who prefer a project-specific setup, but the global installation option should be the default for most use cases.

Breaking changes

No

Screenshots

No

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jan 10, 2025 8:42pm

Copy link
Contributor

github-actions bot commented Jan 10, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@wpplumber
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 10, 2025
@michaelbromley
Copy link
Member

Hi,

Thanks for the suggestion, but I think that it is preferable to install the CLI locally to the project in question. Why?

  • Installing globally ties it to the global node version. Many people use node version managers like nvm to swap between different versions. The global version is only available for the version on which it was installed. This leads to the developer needing to globally install it multiple times when they switch node versions.
  • When installed locally, the CLI version is tied to the local Vendure version. So we eliminate the potential risk of having e.g. an outdated global CLI version which is generating scaffold which is either incompatible or just outdated in a newer project.
  • You may also have multiple Vendure projects running multi versions. But there can only be a single globally installed CLI version.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants