Skip to content

Commit fce66b7

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

File tree

5 files changed

+198
-202
lines changed

5 files changed

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

0 commit comments

Comments
 (0)