auto update npm package when git submodule update
#!/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
}