You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

npm-scripts-conventional-changelog

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-scripts-conventional-changelog

Configuration for npm-scripts-config where conventional-changelog, commitlint and commitizen are ready to use.

0.1.0
latest
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created

npm-scripts-conventional-changelog

Configuration for npm-scripts-config where conventional-changelog, commitlint and commitizen are ready to use.

This configuration expose three commands:

  • commit: trigger commitizen to guide the developer to write a standardized commit message
  • commitmsg: used by husky to lint commit message when git commit is run
  • version: generates a changelog and it to the commit
  • preview-changelog: adds unreleased commits to changelog to preview the output (warning: do not commit this generated changelog)

commitizen, commitlint and conventional-changelog are configured to follow angular conventions.

Installation

npm install --save-dev npm-scripts-config npm-scripts-conventional-changelog

Create a new file that will load the configuration from this package.

.scriptsrc

{
    "@extends": "npm-scripts-conventional-changelog"
}

In your project you still need to specify which rules you want to use for commitlint and commitizen, but packages will already be installed. To specify those rules you need to create update the package.json and create a commitlint.config.js files:

package.json

{
    [...]
    "scripts": {
        "commit": "npm-scripts-config commit",
        "commitmsg": "npm-scripts-config commitmsg",
        "version": "npm-scripts-config version",
        "preview-changelog": "npm-scripts-config preview-changelog"
    },
    "config": {
        "commitizen": {
            "path": "cz-conventional-changelog"
        }
    },
    [...]
}

commitlint.config.js

module.exports = {
  extends: ["@commitlint/config-conventional"]
}

FAQs

Package last updated on 02 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts