Skip to content

Commit

Permalink
chore: add husky pre-commit hook to build js
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Dec 14, 2021
1 parent b474104 commit 81c44b9
Show file tree
Hide file tree
Showing 4 changed files with 2,742 additions and 2,691 deletions.
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm build
git add .
22 changes: 22 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc --noEmit && ncc build index.ts -o dist -m",
"test": "tsc --noEmit && jest --silent",
"lint": "eslint . --ext .ts"
"lint": "eslint . --ext .ts",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -42,6 +43,7 @@
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.0",
"jest": "^27.4.4",
"prettier": "^2.5.1",
"ts-jest": "^27.1.1",
Expand Down
Loading

0 comments on commit 81c44b9

Please sign in to comment.