Skip to content

CreateWheel/mini-cz

This branch is 4 commits ahead of main.

Folders and files

NameName
Last commit message
Last commit date
Jun 19, 2023
May 10, 2023
Jul 6, 2023
Jan 27, 2023
Jun 19, 2023
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
Dec 19, 2022
May 10, 2023
May 10, 2023
Aug 1, 2023
Aug 1, 2023
Dec 23, 2022
Mar 21, 2023
May 10, 2023

Repository files navigation

mini-cz

NPM version

🀘 Description

Mini-cz is a tiny commitizen alternative.

πŸ’Ž Features

  • Commitizen alternative, but much smaller
  • Supports commit types
  • Supports commit scopes
  • Extensible configuration

πŸ“¦ Installation

$ npm install mini-cz -D
$ yarn add mini-cz -D
$ pnpm install mini-cz -D

# install default config; or you can use your own config
$ npm install @mini-cz/config-default -D
$ yarn add @mini-cz/config-default -D
$ pnpm install @mini-cz/config-default -D

πŸš€ Usage

First create a mini-cz.config.ts in your workspace root.

// mini-cz.config.ts
export { default } from "@mini-cz/config-default";

Then add a script to your package.json:

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

Finally, run npm run commit, yarn commit or pnpm commit to start the commit process.

πŸ“– Documentation

Configuration

You can configure mini-cz by creating a mini-cz.config.ts file in your workspace root.

// mini-cz.config.ts
import { defineConfig } from "mini-cz";

export default defineConfig({
  // This is @mini-cz/config-default
  kinds: [
    {
      name: "feat",
      description: "A new feature",
      emoji: "✨",
    },
    {
      name: "fix",
      description: "A bug fix",
      emoji: "πŸ›",
    },
    {
      name: "docs",
      description: "Documentation only changes",
      emoji: "πŸ“š",
    },
    {
      name: "style",
      description:
        "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
      emoji: "πŸ’Ž",
    },
    {
      name: "refactor",
      description: "A code change that neither fixes a bug nor adds a feature",
      emoji: "πŸ“¦",
    },
    {
      name: "perf",
      description: "A code change that improves performance",
      emoji: "πŸš€",
    },
    {
      name: "test",
      description: "Adding missing tests or correcting existing tests",
      emoji: "🚨",
    },
    {
      name: "chore",
      description:
        "Changes that do not modify src or test files. Such as updating build tasks, package manager configs, etc.",
      emoji: "πŸ€–",
    },
  ],
  // And you can add some scope
  scopes: ["core", "config-default"],
});

πŸ“ License

MIT. Made with ❀️ by Ray