diff --git a/node/install.sh b/node/install.sh new file mode 100755 index 0000000..cae4463 --- /dev/null +++ b/node/install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# vim:set ft=bash: + +cd "$(dirname "${BASH_SOURCE[0]}")" \ + && source "../script/utils.sh" + +if ! [[ -d "~/.zsh-plugins/zsh-nvm" ]]; then + execute \ + "git clone https://github.com/lukechilds/zsh-nvm.git ~/.zsh-plugins/zsh-nvm" \ + "zsh-nvm" +fi + +execute "nvm install lts/iron" "Node.js 20.x" + +execute "nvm install lts/hydrogen" "Node.js 18.x" diff --git a/node/nvm.zsh b/node/nvm.zsh index ec73494..6f666d2 100644 --- a/node/nvm.zsh +++ b/node/nvm.zsh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh -export NVM_HOMEBREW="$(brew --prefix nvm)" -zstyle ':omz:plugins:nvm' autoload yes +export NVM_COMPLETION=true +source ~/.zsh-plugins/zsh-nvm/zsh-nvm.plugin.zsh