Skip to content

Commit

Permalink
feat(added husky): husky for easy committing
Browse files Browse the repository at this point in the history
Husky allows for git commit to run a pre-commit hook so that we get dependable commit messages
  • Loading branch information
CodeItQuick committed Oct 9, 2020
1 parent 011e864 commit 5d750b8
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ $ npm run test

## Committing

Simply use git cz or just cz instead of git commit when committing. You can also use git-cz, which is an alias for cz.
```sh
$ git add .
$ npm run commit
```

Answer the proceeding questions and you should be good-to-go.

## Pull Requests

Expand Down
155 changes: 155 additions & 0 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"gzip-size": "5.1.1",
"html-webpack-plugin": "^4.4.1",
"http-proxy-middleware": "1.0.3",
"husky": "^4.3.0",
"jest": "24.9.0",
"jest-axe": "^3.4.0",
"jest-localstorage-mock": "^2.4.0",
Expand Down Expand Up @@ -163,5 +164,10 @@
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
}
}
}

0 comments on commit 5d750b8

Please sign in to comment.