Skip to content

Commit

Permalink
adds git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed Aug 13, 2022
1 parent 1b0419a commit 801ff7b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
12 changes: 12 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

echo ""
echo " #########################################################"
echo " ## ##"
echo " ## Hook (pre-commit) ##"
echo " ## ##"
echo " ## Rebuild package-lock.json.... ##"
echo " ## (use --no-verify to skip) ##"
echo " ## ##"
echo " #########################################################"

npm install --silent
12 changes: 12 additions & 0 deletions hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

echo ""
echo " #########################################################"
echo " ## ##"
echo " ## Hook (pre-push) ##"
echo " ## ##"
echo " ## Running local tests prior to push.... ##"
echo " ## (use --no-verify to skip) ##"
echo " ## ##"
echo " #########################################################"

npm test
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"url": "https://github.com/sintaxi/harp.git"
},
"dependencies": {
"@colors/colors": "^1.5.0",
"@colors/colors": "1.5.0",
"async": "0.2.9",
"basic-auth": "^2.0.1",
"boxt": "^1.1.2",
Expand All @@ -63,6 +63,7 @@
"should": "3.3.2"
},
"scripts": {
"prepare": "git config core.hooksPath ./hooks",
"test": "mocha --reporter spec -t 4000",
"test:fallbacks": "mocha test/fallbacks.js -t 3000",
"test:helpers": "mocha test/helpers.js -t 3000"
Expand Down

0 comments on commit 801ff7b

Please sign in to comment.