1. gulp-conventional-changelog
Generate a changelog using conventional-changelog.
gulp-conventional-changelog
Package: gulp-conventional-changelog
Created by: conventional-changelog
Last modified: Fri, 03 May 2024 22:58:00 GMT
Version: 5.0.0
License: MIT
Downloads: 22,764
Repository: https://github.com/conventional-changelog/conventional-changelog

Install

npm install gulp-conventional-changelog
yarn add gulp-conventional-changelog

gulp-conventional-changelog NPM version Build Status Dependency Status Coverage Status

Generate a changelog using conventional-changelog

Issues with the output should be reported on the conventional-changelog issue tracker.

Checkout the gulp official recipe to automate releases with gulp and gulp-conventional-changelog.

Install

$ npm install --save-dev gulp-conventional-changelog

Usage

 import gulp from 'gulp';
import conventionalChangelog from 'gulp-conventional-changelog';

gulp.task('changelog', function () {
  return gulp.src('CHANGELOG.md')
    .pipe(conventionalChangelog({
      // conventional-changelog options go here
      preset: 'angular'
    }, {
      // context goes here
    }, {
      // git-raw-commits options go here
    }, {
      // conventional-commits-parser options go here
    }, {
      // conventional-changelog-writer options go here
    }))
    .pipe(gulp.dest('./'));
});

streaming mode

 gulp.task('changelog', function () {
  return gulp.src('CHANGELOG.md', {
    buffer: false
  })
    .pipe(conventionalChangelog({
      preset: 'angular'
    }))
    .pipe(gulp.dest('./'));
});

buffer mode

 gulp.task('changelog', function () {
  return gulp.src('CHANGELOG.md')
    .pipe(conventionalChangelog({
      preset: 'angular'
    }))
    .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.

 import gulp from 'gulp';
import conventionalChangelog from 'conventional-changelog';
import fs from 'fs';

gulp.task('default', function () {
  return conventionalChangelog({
    preset: 'angular',
    releaseCount: 0
  })
    .pipe(fs.createWriteStream('CHANGELOG.md'));
});

Or

 import gulp from 'gulp';
import conventionalChangelog from 'gulp-conventional-changelog';

gulp.task('default', function () {
  return gulp.src('CHANGELOG.md', {
    read: false
  })
    .pipe(conventionalChangelog({
      preset: 'angular',
      releaseCount: 0
    }))
    .pipe(gulp.dest('./'));
});

API

See the conventional-changelog docs.

There are some changes:

changelogOpts

warn

If the cli contains flag --verbose it is fancyLog.

License

MIT © Steve Mao

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code