Skip to content

Commit 474e8a7

Browse files
committed
Add husky for automatically running sqlx prepare on commit
1 parent 077d675 commit 474e8a7

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
cd database && cargo sqlx prepare && git add ./sqlx-data.json

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222
"scripts": {
2323
"start": "react-scripts start",
2424
"build": "react-scripts build",
25-
"docker:build": "docker build -t qcext-server ."
25+
"docker:build": "docker build -t qcext-server .",
26+
"prepare": "husky install"
2627
},
2728
"proxy": {
2829
"/api": {
2930
"target": "http://localhost:5000"
3031
}
32+
},
33+
"devDependencies": {
34+
"husky": "^8.0.1"
3135
}
32-
}
36+
}

0 commit comments

Comments
 (0)