CreateWheel / mini-cz

The minimal commitizen cli.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

The minimal commitizen cli.

License:MIT License


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%