Skip to content

Commit 39c559c

Browse files
author
Hyunje Jun
committed
Add git hooks to check format, build, and test
Used Husky to integrate the git hooks and npm scripts.
1 parent ea76008 commit 39c559c

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

package-lock.json

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
"build": "tsc",
2727
"docs": "gitbook install && gitbook serve docs",
2828
"docs:publish": "./docs/publish.sh",
29-
"release": "npm run build && npm publish --access public"
29+
"release": "npm run build && npm publish --access public",
30+
"precommit": "npm run format:check",
31+
"prepush": "npm run format:check && npm run build && npm run test"
3032
},
3133
"repository": {
3234
"type": "git",
@@ -49,6 +51,7 @@
4951
"del-cli": "^1.1.0",
5052
"express": "^4.15.3",
5153
"gitbook-cli": "^2.3.0",
54+
"husky": "^0.14.3",
5255
"mocha": "^3.4.2",
5356
"prettier": "^1.7.4",
5457
"ts-node": "^3.0.6",

0 commit comments

Comments
 (0)