Skip to content

Commit 69acabd

Browse files
committed
chore: automate git hooks
1 parent ca7e71f commit 69acabd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@
2424
"gitdown": "^2.5.4",
2525
"glob": "^7.1.3",
2626
"globby": "^8.0.1",
27+
"husky": "^1.1.2",
2728
"marked": "^0.5.1",
2829
"mocha": "^5.2.0",
2930
"semantic-release": "^15.10.3"
3031
},
3132
"engines": {
3233
"node": ">=4"
3334
},
35+
"husky": {
36+
"hooks": {
37+
"post-commit": "npm run create-readme && git add README.md && git commit -m 'docs: generate docs' --no-verify",
38+
"pre-commit": "npm run lint && npm run test && npm run build"
39+
}
40+
},
3441
"keywords": [
3542
"eslint",
3643
"plugin",
@@ -49,7 +56,7 @@
4956
"scripts": {
5057
"add-assertions": "babel-node --presets es2015 ./src/bin/readme-assertions",
5158
"build": "NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps",
52-
"generate-readme": "gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions",
59+
"create-readme": "gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions",
5360
"lint": "eslint ./src ./test",
5461
"test": "mocha --recursive --compilers js:@babel/register"
5562
},

0 commit comments

Comments
 (0)