0.0.12 • Published 3 years ago

cz-template v0.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

cz-template

The Commitizen adapter to formulate commit message. This repository is inspired by cz-emoji

Install

  1. Install package
$ npm i -g commitizen
$ npm i -g cz-template
  1. create .czrc in your project folder

Usage

The ./czrc look like...

  1. You can add questions, scopes, types to extend default setting.
  2. Change formula with es6 strings template to format commit message reference Support:
    • ${title}: This will fill commit type e.q. feat, fix, ...
    • ${emoji}: Fill emoji icon
    • ${subject}: Fill subject of commit message
    • ${description}: Fill description about commit message
    • ${scope}: Fill scope name e.q. ${title} ${emoji} ${scope}: ${subject => fix 🎉 (common): Fixed example

NOTE: Have a issue with scopes

{
  "path": "cz-template",
  "config": {
    "cz-template": {
      "questions": [
        {
          "type": "input",
          "name": "issues",
          "message": "Add issue references (e.g. 'fix #123', 're #123'.):\n"
        },
        {
          "type": "list",
          "name": "scope",
          "message": "What is the scope of this change (e.g. component or file name)?",
          "choices": [
            {
              "name": "None",
              "value": ""
            },
            {
              "name": "test-scope",
              "value": "test-scope"
            }
          ]
        }
      ],
      "types": [
        {
          "description": "Add new feature",
          "title": "Features",
          "name": "feat",
          "emoji": "🎉",
          "code": ":tada:"
        },
        {
          "description": "Add type test",
          "title": "Test add type",
          "name": "testAddType",
          "emoji": "🎉",
          "code": ":tada:"
        }
      ],
      "formula": "${title} ${emoji} ${scope}: ${subject}"
    }
  }
}

TODO

  • Fixed scopes options
  • Add loader to find .czrc (reference)
  • Pull request cz-ci to support js format

Reference:

cz-emoji cz-cli

0.0.11

3 years ago

0.0.12

3 years ago

0.0.10

5 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago