This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs (README.md): added usage details
1 parent
b8d15e3
commit 2580bc8
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
} | ||
|
||
${Type} (${Scope}): ${Short Message} | ||
|
||
${Body} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,56 @@ | ||
# cmt | ||
|
||
Write consistent git commit messages | ||
|
||
## Installation | ||
|
||
```bash | ||
stack build && stack install | ||
``` | ||
|
||
## Usage | ||
|
||
Add a `.cmt` file to your project directory. | ||
|
||
### Format | ||
|
||
A `.cmt` file consist of two parts: the input parts and the output format. | ||
|
||
For example, the [AngularJS Commit Message Guidelines](https://gist.github.com/stephenparish/9941e89d80e2bc58a153): | ||
|
||
```txt | ||
{ | ||
"Type" = [ | ||
"feat", | ||
"fix", | ||
"docs", | ||
"style", | ||
"refactor", | ||
"test", | ||
"chore" | ||
] | ||
"Scope" = @ | ||
"Subject" = @ | ||
"Body" = !@ | ||
"Footer" = !@ | ||
} | ||
${Type} (${Scope}): ${Subject} | ||
${Body} | ||
${Footer} | ||
``` | ||
|
||
|
||
#### Input Parts | ||
|
||
These are at the top of the `.cmt` file and surrounded by opening and closing curly braces. A consist of a name and a type: | ||
|
||
- `@`: single line input | ||
- `!@`: multi line input | ||
- `["option 1", "option 2"]`: list of options | ||
|
||
#### Output Format | ||
|
||
The output format consists of named input parts plus anything else you want. |