nodejs setup update
- install nodejs via package manager instead of nvm - remove nvm - remove zsh integration
This commit is contained in:
parent
b152d947ad
commit
c1076c3091
2 changed files with 17 additions and 31 deletions
|
@ -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
17
src/setup/dev/nodejs.py
Normal 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")
|
Loading…
Add table
Add a link
Reference in a new issue