Created
June 23, 2023 10:01
-
-
Save florianpasteur/606d95b1dc45507bc311567d77aa67a5 to your computer and use it in GitHub Desktop.
Simple & straight forward dependecy check for npm projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not use project root folder as it would catch the package.json file | |
SRC_LOCATION=apps | |
PACKAGE_JSON_LOCATION=package.json | |
for dep in $(jq -r '.dependencies | keys[]' $PACKAGE_JSON_LOCATION) | |
do | |
if grep -R -m 1 $dep $SRC_LOCATION > /dev/null; | |
then | |
echo "✅ " $dep | |
else | |
echo "❌ " $dep | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment