Git Product home page Git Product logo

Comments (5)

stdedos avatar stdedos commented on July 16, 2024 17

What about just adding types, instead of types blinding overriding base spec?

from cz-cli.

talohana avatar talohana commented on July 16, 2024 8

Almost 5 years later, but is there any "easier" solution to this rather than forking and publishing an adapter?

from cz-cli.

jimthedev avatar jimthedev commented on July 16, 2024 1

The easiest way to do this is to create an adapter.

To do this:

  1. Fork the commitizen/cz-conventional-changelog repo.
  2. Change the package.json's name field to your new adapter name (ie. cz-emcniece-changelog) and set the version field to 1.0.0.
  3. Edit index.js to have your custom types.
  4. npm publish when you're ready to publish your adapter to npm.
  5. In any repo you want to use your new adapter you can just run commitizen init cz-emcniece-changelog --save-dev --save-exact. If the repo already has an adapter installed then you a can add the --force flag to that last command and it will overwrite your old config.

from cz-cli.

emcniece avatar emcniece commented on July 16, 2024

Awesome - thanks so much for the guide!

from cz-cli.

pminf avatar pminf commented on July 16, 2024

@talohana You can override all types by specfiing your own inside your projects package.json:

{
  [...]
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog",
      "types": {
        "foo": {
          "title": "foo",
          "description": "This is a foo change."
        },
        "bar": {
          "title": "bar",
          "description": "This is a bar change."
        }
      }
    }
  }
}

This will replace the already defined types from the adapter. I don't know if there is a way to only add custom types.

See also https://github.com/commitizen/cz-conventional-changelog#configuration

from cz-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.