Skip to content

Commit

Permalink
docs: update README for conventional-changelog-conventionalcommits wi…
Browse files Browse the repository at this point in the history
…th example (#632)
  • Loading branch information
yairkukielka committed Jun 3, 2020
1 parent 816407a commit 3f00651
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/conventional-changelog-conventionalcommits/README.md
Expand Up @@ -6,6 +6,40 @@ A concrete implementation of the specification described at
[conventionalcommits.org](https://conventionalcommits.org/) for automated
CHANGELOG generation and version management.


## Indirect Usage (as preset)

Use the [Conventional Changelog CLI Quick Start](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli#quick-start) with the `-p conventionalcommits` option.

## Direct Usage (as a base preset so you can customize it)

If you want to use this package directly and pass options, you can use the [Conventional Changelog CLI Quick Start](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli#quick-start) and with the `--config` or `-n` parameter, pass a js config that looks like this
```
'use strict'
const config = require('conventional-changelog-conventionalcommits')
module.exports = config({
"issuePrefixes": ["TEST-"],
"issueUrlFormat": "myBugTracker.com/{prefix}{id}"
})
```

or json config like that:
```
{
"options": {
"preset": {
"name": "conventionalchangelog",
"issuePrefixes": ["TEST-"],
"issueUrlFormat": "myBugTracker.com/{prefix}{id}"
}
}
}
```
This last json config way passes the `preset` object to the `conventional-changelog-preset-loader` package, that in turn, passes this same `preset` object as the config for the `conventional-changelog-conventionalcommits`.



See [conventional-changelog-config-spec](https://github.com/conventional-changelog/conventional-changelog-config-spec) for available
configuration options.

Expand Down

0 comments on commit 3f00651

Please sign in to comment.