Skip to content

Commit

Permalink
Add commitizen to package templates (#418)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Ling <[email protected]>
  • Loading branch information
kosanna and 72636c authored Apr 19, 2021
1 parent d30cdb8 commit 4ecd622
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-donuts-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template/\*-npm-package:** Add `yarn commit` script
7 changes: 7 additions & 0 deletions template/oss-npm-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Next steps:
- [Lint](#lint)
- [Package](#package)
- [Release](#release)
- [Commit messages](#commit-messages)
- [Releasing latest](#releasing-latest)
- [Releasing other dist-tags](#releasing-other-dist-tags)

Expand Down Expand Up @@ -101,6 +102,12 @@ It depends on this repo being hosted on [seek-oss] with appropriate access.

To set up this repo for publishing, follow the instructions in our [OSS npm package guidance].

### Commit messages

This package is published with **[semantic-release]**, which requires a particular commit format to manage semantic versioning.
You can run the interactive `yarn commit` command in place of `git commit` to generate a compliant commit title and message.
If you use the `Squash and merge` option on pull requests, take extra care to format the squashed commit in the GitHub UI before merging.

### Releasing latest

Commits to the `master` branch will be released with the `latest` tag,
Expand Down
7 changes: 7 additions & 0 deletions template/oss-npm-package/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dependencies": {},
"description": "<%- description %>",
"devDependencies": {
"commitizen": "^4.2.3",
"skuba": "*"
},
"files": [
Expand All @@ -20,12 +21,18 @@
},
"scripts": {
"build": "skuba build-package",
"commit": "cz",
"format": "skuba format",
"lint": "skuba lint",
"release": "yarn build && skuba release",
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"sideEffects": false,
"types": "./lib-types/index.d.ts",
"version": "0.0.0-semantically-released"
Expand Down
7 changes: 7 additions & 0 deletions template/private-npm-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Next steps:
- [Lint](#lint)
- [Package](#package)
- [Release](#release)
- [Commit messages](#commit-messages)
- [Releasing latest](#releasing-latest)
- [Releasing other dist-tags](#releasing-other-dist-tags)

Expand Down Expand Up @@ -87,6 +88,12 @@ This package is published to the npm registry under the private `@seek` npm org

It depends on this repo being hosted on [SEEK-Jobs] with appropriate access.

### Commit messages

This package is published with **[semantic-release]**, which requires a particular commit format to manage semantic versioning.
You can run the interactive `yarn commit` command in place of `git commit` to generate a compliant commit title and message.
If you use the `Squash and merge` option on pull requests, take extra care to format the squashed commit in the GitHub UI before merging.

### Releasing latest

Commits to the `master` branch will be released with the `latest` tag,
Expand Down
7 changes: 7 additions & 0 deletions template/private-npm-package/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dependencies": {},
"description": "<%- description %>",
"devDependencies": {
"commitizen": "^4.2.3",
"skuba": "*"
},
"files": [
Expand All @@ -20,12 +21,18 @@
},
"scripts": {
"build": "skuba build-package",
"commit": "cz",
"format": "skuba format",
"lint": "skuba lint",
"release": "yarn build && skuba release",
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"sideEffects": false,
"types": "./lib-types/index.d.ts",
"version": "0.0.0-semantically-released"
Expand Down

0 comments on commit 4ecd622

Please sign in to comment.