Skip to content

Commit 5f7d62f

Browse files
author
Amelia Wattenbeger
committed
add husky hook
1 parent f79bcb8 commit 5f7d62f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run build

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"scripts": {
3-
"build": "node_modules/.bin/esbuild --target=es2020 ./src/index.jsx --bundle --platform=node --outfile=index.js"
3+
"build": "node_modules/.bin/esbuild --target=es2020 ./src/index.jsx --bundle --platform=node --outfile=index.js",
4+
"prepare": "husky install"
45
},
56
"dependencies": {
67
"@actions/core": "^1.4.0",
78
"@actions/exec": "^1.1.0",
89
"d3": "^7.0.0",
910
"esbuild": "^0.12.15",
11+
"husky": "^7.0.1",
1012
"lodash": "^4.17.21",
1113
"react": "^17.0.2",
1214
"react-dom": "^17.0.2"
15+
},
16+
"devDependencies": {
17+
"husky": "^7.0.0"
1318
}
1419
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ esbuild@^0.12.15:
280280
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.15.tgz#9d99cf39aeb2188265c5983e983e236829f08af0"
281281
integrity sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==
282282

283+
husky@^7.0.1:
284+
version "7.0.1"
285+
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c"
286+
integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==
287+
283288
284289
version "0.6.3"
285290
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"

0 commit comments

Comments
 (0)