💻 Code Snippet

Configure Commitizen with Conventional Changelog

Set up Commitizen with Conventional Changelog to enforce standardized commit messages and automate changelog generation in your projects.

YK
Yokesh K S
Ready to Use
Production Tested

To set up Commitizen in your project, first install the necessary packages:

"dependencies": {
  "commitizen": "^4.3.0",
  "cz-conventional-changelog": "^3.3.0"
}

Next, add the configuration to your package.json:

"config": {
  "commitizen": {
    "path": "./node_modules/cz-conventional-changelog"
  }
}

Finally, add a script to facilitate committing:

"scripts": {
  "commit": "git-cz"
}

Now, you can run npm run commit to initiate the Commitizen prompt, ensuring your commit messages follow the conventional format.

ℹ️
Usage Instructions

Copy the code snippet above and integrate it into your project. Make sure to install any required dependencies and adjust the code to fit your specific use case.

Found this snippet helpful?

Explore more code snippets and components.