Skip to content

Commit d1b6bae

Browse files
committed
chore(tools): add release-it
1 parent 86b53e1 commit d1b6bae

File tree

4 files changed

+1448
-26
lines changed

4 files changed

+1448
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ You can either have a seperate json file and use the `--config` option to point
9292
- **subjectSeperator** _(string, default ':')_: The character to seperate `type` and `scope` from the subject. E.g. with '|' the message would look like `<type>(<scope>)| <subject>`. May not be the empty string.
9393
- **typePrefix** _(string, default '')_: A string that is added before the `type`, e.g. with '[', the message would look like `[<type>(<scope>): <subject>`.
9494
- **typeSuffix** _(string, default '')_: A string that is added after the `type`, e.g. with ']', the message would look like `<type>](<scope>): <subject>`.
95-
- **types** _({ name: string, message: string}, default names: ['feat', 'fix', 'release', 'chore'])_: All the commit types that are allowed for this repo. `name` is what will be at the place of `<type>` in the commit message, `message` is the explanation presented to the user during `prompt` mode.
95+
- **types** _({ name: string, message: string}, default names: ['feat', 'fix', 'chore'])_: All the commit types that are allowed for this repo. `name` is what will be at the place of `<type>` in the commit message, `message` is the explanation presented to the user during `prompt` mode.
9696
- **scopes** _(string array, default [])_: All the scopes that are allowed for all of the commit types.
9797
- **scopeOverrides** _({ [type]: string array }, default {})_: Override the allowed scopes for a particular commit `type`. If this is set for a particular `type` the array defined here is used as allowed scopes instead of the array defined in the `scopes` option.
9898
- **allowCustomScopes** _(boolean, default false)_: Set this to true if the user is allowed to write out a scope that is not on the list of allowed scopes.

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commithelper",
3-
"version": "1.0.0",
3+
"version": "0.0.0",
44
"description": "A tool to create and lint commit messages",
55
"keywords": [
66
"commit",
@@ -17,6 +17,7 @@
1717
"test": "cross-env TS_NODE_PROJECT=\"test/tsconfig.json\" nyc mocha -r ts-node/register test/*.ts",
1818
"format": "prettier --write ./src",
1919
"commit": "ts-node src/index.ts prompt",
20+
"release": "release-it",
2021
"prepare": "npm run build && husky install",
2122
"prepublishOnly": "npm run build"
2223
},
@@ -29,13 +30,22 @@
2930
"chore": [
3031
"tools",
3132
"refactor",
33+
"release",
3234
"test",
3335
"deps",
3436
"docs",
3537
"examples"
3638
]
3739
}
3840
},
41+
"release-it": {
42+
"git": {
43+
"commitMessage": "chore(release): v${version}"
44+
},
45+
"github": {
46+
"release": true
47+
}
48+
},
3949
"devDependencies": {
4050
"@types/inquirer": "^7.3.1",
4151
"@types/mocha": "^8.2.1",
@@ -46,6 +56,7 @@
4656
"mocha": "^8.3.2",
4757
"nyc": "^15.1.0",
4858
"prettier": "^2.2.1",
59+
"release-it": "^14.4.1",
4960
"ts-node": "^9.1.1",
5061
"typescript": "^4.2.3"
5162
},

0 commit comments

Comments
 (0)