Skip to content

Commit

Permalink
docs(semver): update preset customization section
Browse files Browse the repository at this point in the history
  • Loading branch information
edbzn committed Dec 22, 2023
1 parent c46cf5c commit 79820e9
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,45 @@ The preset is highly configurable, following the [conventional-changelog configu
}
```

You can also add your own custom types, for example:
You can also add your custom types, for example:

```json
{
"executor": "@jscutlery/semver:version",
"options": {
"preset": {
"types": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "chore", "section": "Chores" },
{ "type": "build", "section": "Build System" },
{ "type": "ci", "section": "Continuous Integration" },
{ "type": "docs", "section": "Documentation" },
{ "type": "style", "section": "Styles" },
{ "type": "refactor", "section": "Code Refactoring" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "test", "section": "Tests" }
{ "type": "feat", "section": "✨ Features" },
{ "type": "fix", "section": "🐞 Bug Fixes" },
{ "type": "chore", "section": "⚙️ Chores" },
{ "type": "build", "section": "🛠️ Build System" },
{ "type": "ci", "section": "🤖 Continuous Integration" },
{ "type": "docs", "section": "📄 Documentation" },
{ "type": "style", "section": "🎨 Styles" },
{ "type": "refactor", "section": "🧹 Code Refactoring" },
{ "type": "perf", "section": "⚡️ Performance Improvements" },
{ "type": "test", "section": "✅ Tests" }
]
}
}
}
```

> [!NOTES]
> When customizing a preset it will implicitly use the [conventionalcommits](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits) preset and overrides the default settings with the given configuration.
It is possible to customize any preset by passing its name:

```jsonc
{
"executor": "@jscutlery/semver:version",
"options": {
"preset": {
"name": "angular" /* ⬅️ */,
"types": [
{ "type": "feat", "section": "✨ Features" },
{ "type": "fix", "section": "🐞 Bug Fixes" }
/* ... */
]
}
}
Expand Down

0 comments on commit 79820e9

Please sign in to comment.