Generate a changelog from git metadata
You are probably looking for the cli module. Or use one of the plugins if you are already using the tool: grunt/gulp/atom.
$ npm install --save conventional-changelog
var conventionalChangelog = require('conventional-changelog');
conventionalChangelog({
preset: 'angular'
})
.pipe(process.stdout); // or any writable stream
Returns a readable stream.
See the conventional-changelog-core docs. The API is exactly the same with some additions:
Type: string
Possible values: 'angular', 'atom', 'codemirror', 'ember', 'eslint', 'express', 'jquery', 'jscs', 'jshint'
It's recommended to use a preset so you don't have to define everything yourself. The preset values can be overwritten. This value is case insensitive.
This module has options append
and releaseCount
. However, it doesn't read your previous changelog. Reasons being:
- The old logs is just to be appended or prepended to the newly generated logs, which is a very simple thing that could be done in the parent module.
- We want it to be very flexible for the parent module. You could create a readable stream from the file or you could just read the file.
- We want the duty of this module to be very minimum.
So, when you build a parent module, you need to read the old logs and append or prepend to them based on options.append
. However, if options.releaseCount
is 0
you need to ignore any previous logs.
- conventional-github-releaser - Make a new GitHub release from git metadata
- conventional-recommended-bump - Get a recommended version bump based on conventional commits
- conventional-commits-detector - Detect what commit message convention your repository is using
- commitizen - Simple commit conventions for internet citizens.
- angular-precommit - Pre commit with angular conventions
MIT