From d203fe642adf963b251fd292d075194287bdc493 Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Tue, 23 Jan 2024 20:51:10 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20nvm/node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/install.sh | 15 +++++++++++++++ node/nvm.zsh | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 node/install.sh 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