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

Add support for installing default global npm packages on nvm install #179

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

kallja
Copy link
Contributor

@kallja kallja commented Mar 24, 2022

closes #178

@smithshelke
Copy link

Until this gets merged, how are you able work around installing global npm packages

@jorgebucaran
Copy link
Owner

Sorry, I usually never install global packages, but I'd like to see this merged still. It's just that I need a bit of time to sit down and understand what this does and make sure it does it in a way that makes sense. 🙏

@jorgebucaran jorgebucaran added the enhancement New feature or fix label May 9, 2022
Comment on lines 100 to 103
if not set -q $nvm_default_packages[1]
set install_default_packages true
end

Copy link
Owner

Choose a reason for hiding this comment

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

@kallja What's the purpose of this code?

Comment on lines 116 to 120
if test $install_default_packages
echo "Installing default npm packages: $nvm_default_packages"
npm install -g $nvm_default_packages
end
end
Copy link
Owner

Choose a reason for hiding this comment

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

Think we could boil this down to:

if set --query nvm_default_packages[1]
    npm install --global $nvm_default_packages
end

@jorgebucaran jorgebucaran merged commit 2d2efa1 into jorgebucaran:main Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for nvm style default packages
3 participants