Adds helper function to install yarn

This commit is contained in:
Alicia Sykes 2023-06-11 11:47:48 +01:00
parent 3d1a41f3db
commit 3a75c3eee6

View File

@ -144,6 +144,16 @@ install_nvm () {
nvm install v16.16.0 nvm install v16.16.0
} }
# Helper function to install Yarn
install_yarn () {
if hash 'yarn' 2> /dev/null; then
echo -e "\033[0;33mYarn already installed, skipping...\033[0m"
else
echo -e "\033[0;33mInstalling Yarn...\033[0m"
npm install --global yarn
fi
}
# NVM commands # NVM commands
alias nvmi='nvm install' alias nvmi='nvm install'
alias nvmu='nvm use' alias nvmu='nvm use'