✨ nvm -> Volta
This commit is contained in:
parent
b654f354ff
commit
3e942f9f3c
8 changed files with 42 additions and 19 deletions
9
javascript/install.sh
Executable file
9
javascript/install.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# vim:set ft=bash:
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" \
|
||||
&& source "../node/node_utils.sh"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
npm_install "gulp-cli" "gulp CLI"
|
|
@ -1,15 +0,0 @@
|
|||
#!/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"
|
12
node/node_utils.sh
Normal file
12
node/node_utils.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# vim:set ft=bash:
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" \
|
||||
&& source "../script/utils.sh"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
npm_install()
|
||||
{
|
||||
execute ". $DOT/node/path.zsh && npm install --global --silent $1" "$2"
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export NVM_COMPLETION=true
|
||||
source ~/.zsh-plugins/zsh-nvm/zsh-nvm.plugin.zsh
|
3
node/path.zsh
Normal file
3
node/path.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export PATH="$HOME/.volta/bin:$PATH"
|
13
node/volta.sh
Executable file
13
node/volta.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
# vim:set ft=bash:
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" \
|
||||
&& source "../script/utils.sh"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
print_title "Volta & Node.js"
|
||||
|
||||
execute "curl https://get.volta.sh | bash -s -- --skip-setup" "Volta"
|
||||
|
||||
execute ". $DOT/node/path.zsh && volta install node" "Node.js LTS"
|
3
node/volta.zsh
Normal file
3
node/volta.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export VOLTA_HOME="$HOME/.volta"
|
|
@ -359,6 +359,8 @@ main()
|
|||
|
||||
$dotfiles_dir/homebrew/brew.sh
|
||||
|
||||
$dotfiles_dir/node/volta.sh
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
print_title "Installers"
|
||||
|
|
Loading…
Reference in a new issue