Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/btford/grunt-conventional-changelog
Grunt task for generating a changelog from git metadata
https://github.com/btford/grunt-conventional-changelog
Last synced: about 18 hours ago
JSON representation
Grunt task for generating a changelog from git metadata
- Host: GitHub
- URL: https://github.com/btford/grunt-conventional-changelog
- Owner: btford
- Created: 2013-04-06T00:13:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-06-12T00:37:40.000Z (over 7 years ago)
- Last Synced: 2024-10-29T16:56:53.042Z (about 2 months ago)
- Language: JavaScript
- Size: 180 KB
- Stars: 242
- Watchers: 13
- Forks: 61
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
> Generate a changelog using [conventional-changelog](https://github.com/ajoslin/conventional-changelog)
*Issues with the output should be reported on the `conventional-changelog` [issue tracker](https://github.com/ajoslin/conventional-changelog/issues).*
## Install
```
$ npm install --save-dev grunt-conventional-changelog
```## Usage
```js
grunt.loadNpmTasks('grunt-conventional-changelog');grunt.initConfig({
conventionalChangelog: {
options: {
changelogOpts: {
// conventional-changelog options go here
preset: 'angular'
},
context: {
// context goes here
},
gitRawCommitsOpts: {
// git-raw-commits options go here
},
parserOpts: {
// conventional-commits-parser options go here
},
writerOpts: {
// conventional-changelog-writer options go here
}
},
release: {
src: 'CHANGELOG.md'
}
}
});grunt.registerTask('default', ['conventionalChangelog']);
```## API
See the [conventional-changelog](https://github.com/ajoslin/conventional-changelog) docs.
There are some changes:
### changelogOpts
#### warn
It is `grunt.verbose.writeln`.
## Edit your changelog manually
Sometimes after auto-generating the changelog you want to be able to review the generated changes or add some notes to the current release, you can polish your changelog manually without changing your workflow (you might use `grunt-release` in the workflow but need grunt to wait until you have finished polishing your changelog).
Here are some examples of how to achieve this.
```js
grunt.initConfig({// grunt-shell
shell: {
changelog: {
options: {
stdinRawMode: true
},
command: 'subl -w CHANGELOG.md',
}
},// or grunt-spawn
spawn: {
changelog: {
command: 'vim',
pattern: 'CHANGELOG.md',
commandArgs: ['{0}'],
opts: {
stdio: 'inherit'
}
}
},});
...
grunt.registerTask('publish', ['conventionalChangelog', 'shell:changelog', 'release']);
// or
grunt.registerTask('publish', ['conventionalChangelog', 'spawn:changelog', 'release']);
```## License
MIT
[npm-image]: https://badge.fury.io/js/grunt-conventional-changelog.svg
[npm-url]: https://npmjs.org/package/grunt-conventional-changelog
[travis-image]: https://travis-ci.org/btford/grunt-conventional-changelog.svg?branch=master
[travis-url]: https://travis-ci.org/btford/grunt-conventional-changelog
[daviddm-image]: https://david-dm.org/btford/grunt-conventional-changelog.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/btford/grunt-conventional-changelog
[coveralls-image]: https://coveralls.io/repos/github/btford/grunt-conventional-changelog/badge.svg
[coveralls-url]: https://coveralls.io/r/btford/grunt-conventional-changelog