Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vuejs/conventional-changelog
Preset for conventional-changelog
https://github.com/vuejs/conventional-changelog
Last synced: about 2 months ago
JSON representation
Preset for conventional-changelog
- Host: GitHub
- URL: https://github.com/vuejs/conventional-changelog
- Owner: vuejs
- Created: 2018-07-13T00:05:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-13T16:34:14.000Z (about 6 years ago)
- Last Synced: 2024-03-22T09:08:31.996Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 23
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @vue/conventional-changelog
Custom preset for [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog/) which groups changes by package (`packages/@vue/xxx`). It works by getting the package which has the highest number of changed files in each commit.
```bash
yarn add -D @vue/conventional-changelog
```Example usage:
```js
const execa = require('execa')
const cc = require('conventional-changelog')
const config = require('@vue/conventional-changelog')const gen = module.exports = version => {
const fileStream = require('fs').createWriteStream(`CHANGELOG.md`)cc({
config,
releaseCount: 0,
pkg: {
transform (pkg) {
pkg.version = `v${version}`
return pkg
}
}
}).pipe(fileStream).on('close', async () => {
delete process.env.PREFIX
await execa('git', ['add', '-A'], { stdio: 'inherit' })
await execa('git', ['commit', '-m', `chore: ${version} changelog [ci skip]`], { stdio: 'inherit' })
})
}if (process.argv[2] === 'run') {
const version = require('../lerna.json').version
gen(version)
}
```[Result example](https://gist.github.com/Akryum/3cc2e3afaf5f7e730a3b9648b7ce4133)