Skip to content

Commit

Permalink
chore(commitizen): adds commitizen
Browse files Browse the repository at this point in the history
  • Loading branch information
sharvit committed Dec 22, 2018
1 parent daacd48 commit 1f8952e
Show file tree
Hide file tree
Showing 6 changed files with 437 additions and 53 deletions.
6 changes: 6 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"@commitlint/config-conventional",
"cz"
]
}
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ notifications:
email: false
node_js: 10
script:
- yarn lint:commit-travis
- yarn lint
- yarn test
after_success: yarn coveralls
Expand Down
18 changes: 16 additions & 2 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ yarn lint
yarn lint --fix
```

Run linter to validate your commit message:

```sh
yarn lint:commit
```

## Committing and Pushing changes

Create a branch and start hacking:
Expand All @@ -48,9 +54,17 @@ git checkout -b my-branch

Commit and push your changes:

`generator-node-mdl` uses [commitizen](https://github.com/commitizen/cz-cli) to create commit messages so [semantic-release](https://github.com/semantic-release/semantic-release) can automatically create releases.

```sh
git add .
yarn commit
# answer the questions
```

Push your changes:

```sh
git add my/changed/files
git commit
git push origin my-branch
```

Expand Down
5 changes: 1 addition & 4 deletions other/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ We haven‘t filled this out yet though. Care to help? See [`contributing.md`](.

## Want to do

- [ ] Install [Greenkeeper](https://greenkeeper.io/) on this repository
- [ ] Install [semantic-release](https://github.com/semantic-release/semantic-release) on this repository
- [ ] Add option to install [semantic-release](https://github.com/semantic-release/semantic-release)
- [ ] Add option to install [Greenkeeper](https://greenkeeper.io/)
- Add option to install [semantic-release](https://github.com/semantic-release/semantic-release)

## Might do

Expand Down
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"test": "jest --coverage",
"test:watch": "jest --watch",
"lint": "eslint ./app",
"lint:commit": "commitlint -e",
"lint:commit-travis": "commitlint-travis",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"commit": "git-cz",
"semantic-release": "semantic-release"
},
"files": [
Expand All @@ -33,7 +36,12 @@
"yeoman-generator": "^3.1.1"
},
"devDependencies": {
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@commitlint/travis-cli": "^7.2.1",
"commitlint-config-cz": "^0.10.1",
"coveralls": "^3.0.2",
"cz-conventional-changelog": "2.1.0",
"eslint": "^5.10.0",
"eslint-config-prettier": "^3.3.0",
"eslint-config-standard": "^12.0.0",
Expand All @@ -44,9 +52,9 @@
"eslint-plugin-standard": "^4.0.0",
"jest": "^23.6.0",
"prettier": "^1.15.3",
"semantic-release": "^15.13.1",
"yeoman-assert": "^3.1.0",
"yeoman-test": "^2.0.0",
"semantic-release": "^15.13.1"
"yeoman-test": "^2.0.0"
},
"jest": {
"testEnvironment": "node",
Expand All @@ -55,6 +63,11 @@
"/templates/"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"keywords": [
"yeoman-generator",
"yeoman",
Expand Down
Loading

0 comments on commit 1f8952e

Please sign in to comment.