Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glauberf/teste-padrao-commit
https://github.com/glauberf/teste-padrao-commit
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/glauberf/teste-padrao-commit
- Owner: GlauberF
- Created: 2024-01-29T13:38:05.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-30T20:01:09.000Z (10 months ago)
- Last Synced: 2024-01-31T20:10:00.612Z (10 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# teste-padrao-commit
Passos Instalação
- npm i commitizen https://github.com/GlauberF/cz-conventional-changelog-for-jira-a --save-dev
- npm i simple-git-hooks --save-dev
- npm i prettier --save-dev
- npm i lint-staged --save-dev
- Criar um arquivo `czrc` e incluir o path e configs necessárias.
```bash
{
"path": "./node_modules/@glauberfunez/cz-conventional-changelog-for-jira"
}
```
- Configurando simple-git-hooks
```json
//package-json
"simple-git-hooks": {
"pre-commit": "lint-staged && git add .",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"commit-msg": "",
"pre-push": ""
},
```
- Na raiz do projeto
```bash
# [Optional] These 2 steps can be skipped for non-husky users
git config core.hooksPath .git/hooks/
rm -rf .git/hooks# Update ./git/hooks
npx simple-git-hooks
```
Sempre que atualizar o simple-git-hooks no package, executar o comando `npx simple-git-hooks`.