Skip to content

Instantly share code, notes, and snippets.

@timothystewart6
Last active September 30, 2018 02:34
Show Gist options
  • Save timothystewart6/7b43c3acd502179f9aca7a90a9b44c09 to your computer and use it in GitHub Desktop.
Save timothystewart6/7b43c3acd502179f9aca7a90a9b44c09 to your computer and use it in GitHub Desktop.
npm/yarn install into each subdirectory that has a package.json .
# This is used when you need to install npm modules for each sub dir that contains a package.json
# This is helpful when cloning an entire org's repos and you aren't sure which are js projects
for dir in ~/dev/work/**;
do if [ ! -f package.json ]; then
(cd "$dir" && yarn install)
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment