Write changelog using keepachangelog conventions
npm install changelogkeeper> Write changelog using keepachangelog conventions
``sh`
$ npm install --save-dev changelogkeeper
Add these scripts to package.json:
`json`
// package.json
"scripts": {
...
"commitChangelog": "git add CHANGELOG.md && git commit -m 'Bump changelog'",
"postversion": "changelogkeeper && npm run commitChangelog",
...
}
And then run npm version:
`sh`
npm version [major | minor | patch | ...]
It will read the package version and update the changelog accordingly.
If you have your changelog in another location you can pass the relative path like this:
`json`
// package.json
"postversion": "changelogkeeper '../CHANGELOG.md' && npm run commitChangelog"
Before:
`json`
// package.json
{
...
"version": "3.1.4",
...
}
`md
// CHANGELOG.md
- Some new Feature
- Fixed something
...
`
Then run:
`sh`
npm version minor
After:
`json`
// package.json
{
...
"version": "3.2.0",
...
}
`md
// CHANGELOG.md
- Some new Feature
- Fixed something
...
`
Don't forget to run npm link` so changelogkeeper can run itself.
MIT © [Francisco Kahil]()
[npm-image]: https://badge.fury.io/js/changelogkeeper.svg
[npm-url]: https://npmjs.org/package/changelogkeeper
[travis-image]: https://travis-ci.org/codexico/changelogkeeper.svg?branch=master
[travis-url]: https://travis-ci.org/codexico/changelogkeeper
[daviddm-image]: https://david-dm.org/codexico/changelogkeeper.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/codexico/changelogkeeper
[coveralls-image]: https://coveralls.io/repos/codexico/changelogkeeper/badge.svg
[coveralls-url]: https://coveralls.io/r/codexico/changelogkeeper