1
0
Fork 0

nodejs setup update

- install nodejs via package manager instead of nvm
- remove nvm
- remove zsh integration
This commit is contained in:
Kim, Jimin 2022-11-23 13:52:49 +09:00
parent b152d947ad
commit c1076c3091
2 changed files with 17 additions and 31 deletions

View file

@ -1,31 +0,0 @@
from src.constants import home_dir
from src.util import paru_install, command_exists
from src.setup.system import zsh
from src.log import log
from os.path import isdir
from os import system
desc = "Javascript everywhere!"
def setup():
# Install zsh if it's not installed already
if not command_exists("zsh"):
zsh.setup()
paru_install("nvm")
log("Installing Node.JS LTS")
system("source /usr/share/nvm/init-nvm.sh; nvm install --lts")
# todo: add "source /usr/share/nvm/init-nvm.sh" to ~/.zshrc
log("Installing npm")
system("npm install --global npm")
log("Installing pnpm")
system("npm install --global pnpm")
log("Installing yarn")
system("npm install --global yarn")

17
src/setup/dev/nodejs.py Normal file
View file

@ -0,0 +1,17 @@
from src.util import paru_install
from src.log import log
desc = "Javascript everywhere!"
def setup():
paru_install("nodejs-lts-hydrogen")
log("Installing npm")
system("npm install --global npm")
log("Installing pnpm")
system("npm install --global pnpm")
log("Installing yarn")
system("npm install --global yarn")