Last active
May 31, 2019 13:28
-
-
Save slonoed/321302b9ebe5728531a4fabcbb907d08 to your computer and use it in GitHub Desktop.
Find unused deps
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
FILES=$(cat package.json | jq -r '.dependencies * .devDependencies | keys | join("\n")') | |
ARR=', ' read -r -a array <<< $FILES | |
echo Not found deps | |
echo | |
for dep in "${array[@]}" | |
do | |
grep -qr "$dep" src | |
if [ $? -eq 1 ]; then | |
echo $dep | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment