changelogkeeper

1.2.0 • Public • Published

changelogkeeper NPM version Build Status Dependency Status Coverage percentage

Write changelog using keepachangelog conventions

Installation

$ npm install --save-dev changelogkeeper

Usage

Add these scripts to package.json:

// package.json
"scripts"{
  ...
  "commitChangelog": "git add CHANGELOG.md && git commit -m 'Bump changelog'",
  "postversion": "changelogkeeper && npm run commitChangelog",
  ...
}

And then run npm version:

npm version [major | minor | patch | ...]

It will read the package version and update the changelog accordingly.

Options

If you have your changelog in another location you can pass the relative path like this:

// package.json
"postversion""changelogkeeper '../CHANGELOG.md' && npm run commitChangelog"

Example

Before:

// package.json
{
  ...
  "version": "3.1.4",
  ...
}
// CHANGELOG.md
 
# Changelog
 
## [Unreleased]
 
### Added
 
- Some new Feature
 
## [3.1.4] - 2018-02-04
 
### Fixed
 
- Fixed something
 
## [3.1.3] - 2018-02-03
 
...

Then run:

npm version minor

After:

// package.json
{
  ...
  "version": "3.2.0",
  ...
}
// CHANGELOG.md
 
# Changelog
 
## [Unreleased]
 
## [3.2.0] - 2018-02-04
 
### Added
 
- Some new Feature
 
## [3.1.4] - 2018-02-04
 
### Fixed
 
- Fixed something
 
## [3.1.3] - 2018-02-03
 
...

Development

Don't forget to run npm link so changelogkeeper can run itself.

License

MIT © Francisco Kahil

Package Sidebar

Install

npm i changelogkeeper

Weekly Downloads

38

Version

1.2.0

License

MIT

Unpacked Size

9.21 kB

Total Files

8

Last publish

Collaborators

  • franciscokahil