Extensible Commitizen's format
npm install -D commitizen cz-format-extension
Make .czrc
or add config
fields into package.json
.czrc
{ "path": "cz-format-extension" }
package.json
{ "config": { "commitizen": { "path": "cz-format-extension" } } }
Make .czferc.js
module.exports = { questions({inquirer, gitInfo}) { return [ {...}, {...}, ] }, commitMessage({answers, gitInfo}) { return ... } }
not_added
, created
, deleted
, modified
, renamed
, staged
from StatusResult of simple-gitnot_added
, created
, deleted
, modified
, renamed
, staged
from StatusResult of simple-gitWe prepare the example.
Tips: Configuration settings with typesIf you love to develop with types, you can use that with JSDocs
.
/** * @typedef {{questionType1: string; questionType2: string}} Answers */ /** @type import('cz-format-extension').Config<Answers> */ module.exports = { questions({inquirer, gitInfo}) { return [ { type: "list", name: "questionType1", message: "Select answer", choices: [ {...}, {...} ] }, ] }, commitMessage({answers, gitInfo}) { return `${answers.questionType1}${answers.questionType2}` } }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4