• Stars
    star
    1,375
  • Rank 32,960 (Top 0.7 %)
  • Language
    JavaScript
  • Created almost 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Semantic Git commits

Commitizen friendly

git-cz

image

Without installation

npx git-cz
# or
npx git-cz -e

Install globally standalone

npm install -g git-cz
git-cz
# or
git-cz -e

Install locally with Commitizen

npm install -g commitizen
npm install --save-dev git-cz

package.json:

{
  "config": {
    "commitizen": {
      "path": "git-cz"
    }
  }
}

run:

git cz

Install globally with Commitizen

npm install -g commitizen git-cz
commitizen init git-cz --save-dev --save-exact

run:

git cz

Custom config

You can provide a custom configuration in a changelog.config.js file in your repo, or in any parent folder. git-cz will search for the closest config file. Below is default config:

module.exports = {
  disableEmoji: false,
  format: '{type}{scope}: {emoji}{subject}',
  list: ['test', 'feat', 'fix', 'chore', 'docs', 'refactor', 'style', 'ci', 'perf'],
  maxMessageLength: 64,
  minMessageLength: 3,
  questions: ['type', 'scope', 'subject', 'body', 'breaking', 'issues', 'lerna'],
  scopes: [],
  types: {
    chore: {
      description: 'Build process or auxiliary tool changes',
      emoji: 'πŸ€–',
      value: 'chore'
    },
    ci: {
      description: 'CI related changes',
      emoji: '🎑',
      value: 'ci'
    },
    docs: {
      description: 'Documentation only changes',
      emoji: '✏️',
      value: 'docs'
    },
    feat: {
      description: 'A new feature',
      emoji: '🎸',
      value: 'feat'
    },
    fix: {
      description: 'A bug fix',
      emoji: 'πŸ›',
      value: 'fix'
    },
    perf: {
      description: 'A code change that improves performance',
      emoji: '⚑️',
      value: 'perf'
    },
    refactor: {
      description: 'A code change that neither fixes a bug or adds a feature',
      emoji: 'πŸ’‘',
      value: 'refactor'
    },
    release: {
      description: 'Create a release commit',
      emoji: '🏹',
      value: 'release'
    },
    style: {
      description: 'Markup, white-space, formatting, missing semi-colons...',
      emoji: 'πŸ’„',
      value: 'style'
    },
    test: {
      description: 'Adding missing tests',
      emoji: 'πŸ’',
      value: 'test'
    },
    messages: {
      type: 'Select the type of change that you\'re committing:',
      customScope: 'Select the scope this component affects:',
      subject: 'Write a short, imperative mood description of the change:\n',
      body: 'Provide a longer description of the change:\n ',
      breaking: 'List any breaking changes:\n',
      footer: 'Issues this commit closes, e.g #123:',
      confirmCommit: 'The packages that this commit has affected\n',
    },
  }
};

Non-interactive mode

Using --non-interactive flag you can run git-cz non-interactive mode.

For example:

git-cz --non-interactive --type=feat --subject="add onClick prop to component"

CLI parameters:

  • --type
  • --subject
  • --scope
  • --body
  • --breaking
  • --issues
  • --lerna

Disable Emoji

Using --disable-emoji flag will disable emoji.

For example:

git-cz --disable-emoji

Commit message format

  • A commit message consists of a header, body and footer.
  • The header has a type and a subject:
<type>[(<scope>)]: <emoji> <subject>
[BLANK LINE]
[body]
[BLANK LINE]
[breaking changes]
[BLANK LINE]
[footer]

The header is the only mandatory part of the commit message.

The first line (type + subject) is limited to 50 characters [enforced]

Any other line should be limited to 72 character [automatic wrapping]

This allows the message to be easier to read on GitHub as well as in various git tools.

Format

By default the subject format is: {type}{scope}: {subject}

Configuring the format field in .git-cz.json you can customize your own:

  • {type}{scope}: {emoji}{subject}
  • {emoji}{scope} {subject}

Type

Must be one of the following:

  • test β€” Adding missing tests
  • feat β€” A new feature
  • fix β€” A bug fix
  • chore β€” Build process or auxiliary tool changes
  • docs β€” Documentation only changes
  • refactor β€” A code change that neither fixes a bug or adds a feature
  • style β€” Markup, white-space, formatting, missing semi-colons...
  • ci β€” CI related changes
  • perf β€” A code change that improves performance

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • No dot (.) at the end.

Body

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

Affects [only on lerna environments]

Select the packages the commit affected.

Breaking Changes

Breaking Changes must start with the words BREAKING CHANGE: .

Footer

The footer is the place to reference any tasks related to this commit.

Why this Fork?

npm i -g git-cz
added 1 package in 0.612s

Installs in 0.6s vs 31.1s.

npm i -g mol-conventional-changelog
added 345 packages in 31.076s

More Repositories

1

react-use

React Hooks β€” πŸ‘
TypeScript
37,122
star
2

libreact

Collection of useful React components
TypeScript
2,615
star
3

memfs

JavaScript file system utilities
TypeScript
1,621
star
4

awesome-styleguides

A curated list of UI styleguides β€” πŸ˜ŽπŸ’„
1,193
star
5

use-media

useMedia React hook to track CSS media query state
TypeScript
515
star
6

json-joy

json-joy β€” JSON CRDT, JSON CRDT Patch, JSON Patch, JSON Predicate, JSON Patch Extended, JSON Patch+ OT, MessagePack codec, JSON-Rx, JSON-RPC 2.0, JSON Pointer, Reactive-RPC, random JSON generator, JSON Brand, JSON Expression, JSON Size, JSON Type, JSON Schema, JSON deep equality, JSON Binary, JSON clone / msgpack.org[JavaScript/TypeScript/NodeJS]
TypeScript
469
star
7

nano-css

Distilled CSS-in-JS for gourmet developers
JavaScript
412
star
8

freestyler

5th generation CSS-in-JS library
TypeScript
269
star
9

react-embed

Embed 3rd party widgets
TypeScript
234
star
10

unionfs

Use multiple fs modules at once
TypeScript
200
star
11

ass-js

Assembler.js β€” X86_64 and Ethereum
TypeScript
129
star
12

fs-monkey

Monkey-patches for file system related things
JavaScript
108
star
13

ts-easing

Easing functions in TypeScript
TypeScript
69
star
14

linkfs

Rewrite file system `fs` paths
TypeScript
52
star
15

awesome-css-animations

A curated list of CSS animation resources
48
star
16

jsx-plus-plus

Better JSX for busy developers
JavaScript
48
star
17

jskernel

Node.js exo-kernel dream - proposal
C
46
star
18

use-t

πŸ—Ί Translations with React hooks
TypeScript
42
star
19

libsys

POSIX/Linux/Mac system calls and low level operations for Node.js
C++
40
star
20

spyfs

Node filesystem spies and mocks
JavaScript
38
star
21

bamboo

Bamboo - Node.js clone in pure JavaScript
C
38
star
22

react-universal-interface

Universal Component Interface - FaCC, render prop, component prop, prop injection, HOC, decorator
TypeScript
38
star
23

thingies

Kitchen sink of helpful utilities.
TypeScript
37
star
24

memfs-webpack

Example of how to use memfs with webpack
JavaScript
37
star
25

libjs

libc implemented in JavaScript
TypeScript
35
star
26

react-use-media

react-media hook
TypeScript
27
star
27

md-mdast

Fast tiny Markdown to MDAST parser
TypeScript
21
star
28

react-micro-lifecycles

Life-cycles for React DOM elements
JavaScript
18
star
29

awesome-ci-recipes

Useful scripts and tricks for continuous integration
17
star
30

flexible-input

Autosizing <input> and <textarea> elements, which expand and shrink to fit contents
TypeScript
16
star
31

rx-use

RxJS DOM sensors
TypeScript
16
star
32

three-ducks

Distilled Redux for gourmet developers
JavaScript
15
star
33

fastest-json-copy

Fastest JSON deep clone implementation
JavaScript
14
star
34

react-simple-player

Lightweight React audio player component
TypeScript
14
star
35

pure-arr

Immutable pure Array.prototype functions
TypeScript
13
star
36

cross-ci

Travis, CircleCI, et. al. env vars normalized
JavaScript
13
star
37

jssh

JavaScript Shell
JavaScript
12
star
38

iconista

One NPM install, one React component β€” πŸ’―+ icons
TypeScript
11
star
39

virtual-css

πŸ’„ Virtual CSS for virtual DOM libraries
TypeScript
11
star
40

set-harmonic-interval

one timer for all setInterval() with identical ms delay
TypeScript
11
star
41

hyperdyperid

Very fast base-36 ID generator and random integer generator for Node.js
JavaScript
11
star
42

content-ranking

Formulas for content ranking
TypeScript
11
star
43

entask

Micro- and Macro-tasks for Node and browsers
JavaScript
10
star
44

json-schema-serializer

Fast JSON.stringify with schema
TypeScript
10
star
45

modern-pick

Template string accessors to the selector rescue
TypeScript
10
star
46

stripe-web

Typesafe Stripe for browser
TypeScript
10
star
47

fast-shallow-equal

Very fast object shallow equal comparator
JavaScript
9
star
48

structured-interviews

Templates for structured interviews
JavaScript
9
star
49

ts-brand-json

TypeScript type for JSON-in-a-string
JavaScript
9
star
50

clickable-json

Interactive JSON and JSON CRDT editing and viewing React components
TypeScript
8
star
51

react-passport

React context for client-passport
TypeScript
8
star
52

state-containers

Simple state containers for your services and React apps
TypeScript
8
star
53

igit

Interactive CLI for semantic Git commit messages.
Go
8
star
54

sonic-forest

High performance tree and sorted map implementations for JavaScript in TypeScript
TypeScript
8
star
55

use-unmount

React hook which returns unmount observable
JavaScript
6
star
56

tree-dump

Simple console tree printing helpers
TypeScript
6
star
57

proofread

Proofread your Redux sagas.
JavaScript
6
star
58

crunchme

Pack your .js in a self-extracting compressed file
JavaScript
6
star
59

nodefs

THIS IS OLD, USE streamich/memfs INSTEAD
JavaScript
6
star
60

client-passport

Authentication for single-page apps
TypeScript
5
star
61

fasttrack

TypeScript boilerplate with commands
Shell
5
star
62

emoji-json-list

List of emojis, their aliases and unicode values
JavaScript
5
star
63

css-light

Light-weight module to write CSS in JavaScript
JavaScript
5
star
64

puppet-master

Executes Node.js function in a Chrome browser and returns result
JavaScript
5
star
65

code-colors-react

Code syntax highlighting React component
TypeScript
4
star
66

current-tick

Enqueue function to execute later within current event loop cycle
TypeScript
4
star
67

json-crdt-traces

JSON CRDT document sample change traces in JSON CRDT Patch format, for testing and benchmarking
TypeScript
4
star
68

mdast-flat

Flat version of MDAST format
TypeScript
4
star
69

elf

ELF structs
TypeScript
4
star
70

nmsg-rpc

RPC event based router for JavaScript bi-directional messaging
JavaScript
4
star
71

nano-css-extract-demo

Demo of nano-css extract addon - extracts CSS into an external style sheet
JavaScript
3
star
72

enwire

πŸ™ Rewire env vars
JavaScript
3
star
73

fslib

fs.js in pure JavaScript
TypeScript
3
star
74

libaio

asynchronous system call wrapper
JavaScript
3
star
75

typebase

C/C++ structs in Node.js
TypeScript
3
star
76

jml-h

JsonML + Virtual Hypertext generator (h)
JavaScript
3
star
77

code-colors

Code syntax highlighting for the web
TypeScript
3
star
78

collaborative-input

Collaboration-enabled HTML text editing elements: <input>, <textarea>, and [contenteditable]
TypeScript
3
star
79

v4-uuid

Simple UUID for browser without crypto dependency
TypeScript
2
star
80

socket.io-reqres

Request/response for socket.io
JavaScript
2
star
81

portable-example

portable.js web app tutorial
JavaScript
2
star
82

cpuid

cpuid x86 in JavaScript
JavaScript
2
star
83

node-multicore

Delightful multicore programming in Node.js
TypeScript
2
star
84

redux-oop

TypeScript
2
star
85

json-joy-php

JSON Pointer, JSON Patch and JSON Patch OT for PHP
PHP
2
star
86

xml-light

Simple XML/HTML in JavaScript
JavaScript
2
star
87

redis-joy

Fast and mean Redis 7+ cluster client written in TypeScript which supports RESP3 protocol
TypeScript
2
star
88

uint8-to-b64

Isomorphic Uint8Array conversion to Base64 string and back for browser and Node.js
JavaScript
1
star
89

md-jml

Markdown to JsonML parser in JavaScript
TypeScript
1
star
90

fs-zoo

File system abstractions and implementations
TypeScript
1
star
91

ci-scripts

Travis and CircleCI scripts
JavaScript
1
star
92

dom-copy

Copy to Clipboard
HTML
1
star
93

static-buffer

Execute machine code in your Buffer
JavaScript
1
star
94

utf8-bar

UTF8 % bar for terminal
JavaScript
1
star
95

p4-css

CSS for P4
TypeScript
1
star
96

logich

A light-weight extensible logging system written in Node.js way.
JavaScript
1
star
97

desigual

Syntax highlighter that outputs JsonML
JavaScript
1
star
98

json-joy-go

JSON Pointer (RFC 6901), JSON Patch (RFC 6902), JSON Predicate (IETF draft-snell-json-test-01) for GO
Go
1
star
99

tpl-ts-lib

Template for a TypeScript library.
JavaScript
1
star
100

json-joy-ruby

json-joy port to Ruby
Ruby
1
star