Skip to content

Commit 27678f9

Browse files
author
Maya Shavin
committed
add husky
1 parent 8d44eb8 commit 27678f9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"workspaces": [
66
"packages/*"
77
],
8+
"husky": {
9+
"hooks": {
10+
"pre-commit": "yarn test:unit"
11+
}
12+
},
813
"scripts": {
914
"build": "lerna run build --stream",
1015
"prelint": "yarn build",
@@ -15,10 +20,12 @@
1520
"release": "lerna publish --conventional-commits",
1621
"pretest": "yarn build && jest --rootDir __tests__",
1722
"test": "lerna run test --stream",
23+
"test:unit": "yarn test:url",
1824
"pretest:ci": "yarn pretest",
1925
"test:ci": "lerna run test:ci --stream",
2026
"prettier": "yarn prettier --write .",
21-
"changelog": "node scripts/changelog.js"
27+
"changelog": "node scripts/changelog.js",
28+
"test:url": "npm --prefix packages/url run test:unit"
2229
},
2330
"author": "Maya Shavin <dpnminh@gmail.com>",
2431
"license": "MIT",
@@ -33,7 +40,8 @@
3340
"jest": "^26.6.3",
3441
"lerna": "^3.22.1",
3542
"prettier": "^2.1.2",
36-
"typescript": "^4.0.5"
43+
"typescript": "^4.0.5",
44+
"husky": "^4.3.0"
3745
},
3846
"keywords": [
3947
"cloudinary",

packages/url/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@types/node": "^14.14.7",
4141
"agadoo": "^2.0.0",
4242
"bundlewatch": "^0.3.1",
43+
"husky": "^4.3.0",
4344
"jest": "^26.6.3",
4445
"jest-html-reporters": "^2.1.0",
4546
"ts-jest": "^26.4.4",

0 commit comments

Comments
 (0)