Updated Node package install script to use NPM

Yarn has fallen out of favor in the community so have switched to
native NPM support instead.
This commit is contained in:
Brooke Kuhlmann
2021-07-28 21:46:41 -06:00
parent f790b05831
commit 2e95c72d57
3 changed files with 9 additions and 9 deletions

View File

@@ -129,13 +129,13 @@ export -f verify_path
# Checks for missing Node packages.
verify_node_packages() {
local packages=$(yarn global list --json | grep '"type":"info"')
printf "\nChecking Node packages...\n"
while read line; do
if [[ "$line" == "yarn global add"* ]]; then
if [[ "$line" == "npm "* ]]; then
local package=$(printf "$line" | awk '{print $4}')
local packages=($(npm list --global --depth=0 | grep "$package"))
verify_listed_application "$package" "${packages[*]}"
fi
done < "$MAC_OS_CONFIG_PATH/bin/install_node_packages"