gulp-conventional-changelog
Generate a changelog using conventional-changelog.
Installation
npm install --save-dev gulp-conventional-changelog
Configuration
const gulp = require('gulp');
const conventionalChangelog = require('gulp-conventional-changelog');
gulp.task('changelog', function () {
return gulp.src('CHANGELOG.md')
.pipe(conventionalChangelog({
preset: 'conventionalcommits'
}))
.pipe(gulp.dest('./'));
});
Note: If your options.releaseCount
is 0 (regenerate all changelog from previous releases) you can just use conventional-changelog directly or not to read the file at all.
const gulp = require('gulp');
const conventionalChangelog = require('gulp-conventional-changelog');
gulp.task('changelog', function () {
return gulp.src('CHANGELOG.md')
.pipe(conventionalChangelog({
preset: 'conventionalcommits',
releaseCount: 0
}))
.pipe(gulp.dest('./'));
});