Created
February 20, 2017 06:21
-
-
Save nothingrealhappen/f2ea9760ed4459edfc18ec9bbb3ab976 to your computer and use it in GitHub Desktop.
auto update npm package when git submodule update
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
#!/bin/sh | |
# exit when checkout a file | |
[ "$3" == "0" ] && exit | |
cd gulp | |
echo "Checking npm modules" | |
npm ls > /dev/null && { | |
echo "All package was fresh" | |
} || { | |
echo "Running 'npm install' to install missed package" >&2 | |
npm install --loglevel error && npm prune | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment