Skip to content

Commit d03dca4

Browse files
committed
Update: add types and why section
1 parent 756d9bf commit d03dca4

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
[![Build Status](https://travis-ci.org/JPeer264/node-semantic-git-commit-cli.svg?branch=master)](https://travis-ci.org/JPeer264/node-semantic-git-commit-cli) [![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-semantic-git-commit-cli/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/node-semantic-git-commit-cli?branch=master)
44

5+
> A CLI to keep semantic git commits. With emoji support 😄 👍
6+
7+
## Why?
8+
9+
Many projects got different git commit rules. It is hard to remember them all.
10+
511
## Usage
612

713
```sh
@@ -20,3 +26,49 @@ or even shorter:
2026
```sh
2127
$ sgc
2228
```
29+
30+
## Config
31+
32+
> Just create a `.sgcrc` in your project root or you can add everything in your `package.json` with the value `sgc`
33+
34+
### Types
35+
36+
> Types will define your git commits.
37+
38+
**Keys**
39+
40+
- `prefix` - This will be your commit convention and will be your start of your commit - e.g.: `Feat:`
41+
- `description` (optional) - The description to explain what your prefix is about
42+
- `emoji` (optional) - An emoji which will be appended at the beginning of the commit ([Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/))
43+
44+
The `.sgcrc`:
45+
46+
```json
47+
{
48+
"types": [
49+
{
50+
"emoji": ":sparkles:",
51+
"prefix": "Feat:",
52+
"description": "Any description to describe the prefix"
53+
}
54+
]
55+
}
56+
```
57+
58+
The `package.json`:
59+
60+
```json
61+
{
62+
"name": "Your application name",
63+
"version": "1.0.0",
64+
"sgc": {
65+
"types": [
66+
{
67+
"emoji": ":sparkles:",
68+
"prefix": "Feat:",
69+
"description": "Any description to describe the prefix"
70+
}
71+
]
72+
}
73+
}
74+
```

0 commit comments

Comments
 (0)