mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
added sync-npm-dependencies script and hooks
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"pre-push": "npm test",
|
||||
"post-merge": "npm install"
|
||||
"post-merge": "scripts/sync-npm-dependencies.sh",
|
||||
"post-checkout": "scripts/sync-npm-dependencies.sh"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
|
||||
9
scripts/sync-npm-dependencies.sh
Executable file
9
scripts/sync-npm-dependencies.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "checking package-lock.json for changes"
|
||||
if [ "$1" != "$2" ]; then
|
||||
DIFF=$(git diff $1 $2 package-lock.json)
|
||||
if [ "$DIFF" != "" ]; then
|
||||
npm install
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user