1. grunt-conventional-changelog
Generate a changelog using conventional-changelog
grunt-conventional-changelog
Package: grunt-conventional-changelog
Created by: btford
Last modified: Sat, 18 Jun 2022 14:44:52 GMT
Version: 6.1.0
License: MIT
Downloads: 14,721
Repository: https://github.com/btford/grunt-conventional-changelog

Install

npm install grunt-conventional-changelog
yarn add grunt-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.

Install

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

Usage

 grunt.loadNpmTasks('grunt-conventional-changelog');

grunt.initConfig({
  conventionalChangelog: {
    options: {
      changelogOpts: {
        // conventional-changelog options go here
        preset: 'angular'
      },
      context: {
        // context goes here
      },
      gitRawCommitsOpts: {
        // git-raw-commits options go here
      },
      parserOpts: {
        // conventional-commits-parser options go here
      },
      writerOpts: {
        // conventional-changelog-writer options go here
      }
    },
    release: {
      src: 'CHANGELOG.md'
    }
  }
});

grunt.registerTask('default', ['conventionalChangelog']);

API

See the conventional-changelog docs.

There are some changes:

changelogOpts

warn

It is grunt.verbose.writeln.

Edit your changelog manually

Sometimes after auto-generating the changelog you want to be able to review the generated changes or add some notes to the current release, you can polish your changelog manually without changing your workflow (you might use grunt-release in the workflow but need grunt to wait until you have finished polishing your changelog).

Here are some examples of how to achieve this.

 grunt.initConfig({

  // grunt-shell
  shell: {
    changelog: {
      options: {
        stdinRawMode: true
      },
      command: 'subl -w CHANGELOG.md',
    }
  },

  // or grunt-spawn
  spawn: {
    changelog: {
      command: 'vim',
      pattern: 'CHANGELOG.md',
      commandArgs: ['{0}'],
      opts: {
        stdio: 'inherit'
      }
    }
  },

});

...

grunt.registerTask('publish', ['conventionalChangelog', 'shell:changelog', 'release']);

// or

grunt.registerTask('publish', ['conventionalChangelog', 'spawn:changelog', 'release']);

License

MIT

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin