Skip to content

Commit 83d09d7

Browse files
committed
docs(third-party): separate providers and template docs
1 parent cbbf615 commit 83d09d7

File tree

5 files changed

+199
-202
lines changed

5 files changed

+199
-202
lines changed

docs/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ cookiecutter gh:commitizen-tools/commitizen_cz_template
207207

208208
See [commitizen_cz_template](https://github.com/commitizen-tools/commitizen_cz_template) for details.
209209

210-
Once you publish your rules, you can send us a PR to the [Third-party section](./third-party-commitizen.md).
210+
Once you publish your rules, you can send us a PR to the [Third-party section](./third-party-templates.md).
211211

212212
### Custom commit rules
213213

docs/third-party-commitizen.md

Lines changed: 0 additions & 200 deletions
This file was deleted.

docs/third-party-providers.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
Commitizen can read and write version from different sources. In addition to the native providers, some alternative version sources are available as PyPI packages (installable with `pip`).
3+
4+
## [commitizen-deno-provider](https://pypi.org/project/commitizen-deno-provider/)
5+
6+
A provider for **Deno** projects. The provider updates the version in deno.json and jsr.json files.
7+
8+
### Installation
9+
10+
```sh
11+
pip install commitizen-deno-provider
12+
```
13+
14+
### Usage
15+
16+
Add `deno-provider` to your configuration file.
17+
18+
Example for `.cz.yaml`:
19+
20+
```yaml
21+
---
22+
commitizen:
23+
major_version_zero: true
24+
name: cz_conventional_commits
25+
tag_format: $version
26+
update_changelog_on_bump: true
27+
version_provider: deno-provider
28+
version_scheme: semver
29+
```
30+
31+
## [cz-path](https://pypi.org/project/cz-path/)
32+
33+
Provides prefix choices for commit messages based on staged files (Git only).
34+
For example, if the staged files are `component/z/a.ts` and `component/z/b.ts`,
35+
the path prefix option will be `component/z` and commit message might look like:
36+
`component/z/: description of changes`. If only one file is staged, the extension
37+
is removed in the prefix.
38+
39+
### Installation
40+
41+
```sh
42+
pip install cz-path
43+
```
44+
45+
### Usage
46+
47+
Add `cz-path` to your configuration file.
48+
49+
Example for `.cz.json`:
50+
51+
```json
52+
{
53+
"commitizen": {
54+
"name": "cz_path",
55+
"remove_path_prefixes": ["src", "module_name"]
56+
}
57+
}
58+
```
59+
60+
The default value for `remove_path_prefixes` is `["src"]`. Adding `/` to the
61+
prefixes is not required.
62+
63+
### Example session
64+
65+
```plain
66+
$ git add .vscode/
67+
$ cz -n cz_path c
68+
? Prefix: (Use arrow keys)
69+
» .vscode
70+
.vscode/
71+
project
72+
(empty)
73+
? Prefix: .vscode
74+
? Commit title: adjust settings
75+
76+
.vscode: adjust settings
77+
78+
[main 0000000] .vscode: adjust settings
79+
2 files changed, 1 insertion(+), 11 deletions(-)
80+
81+
Commit successful!
82+
```

0 commit comments

Comments
 (0)