Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
docs (README.md): added usage details
Browse files Browse the repository at this point in the history
smallhadroncollider committed Feb 22, 2019
1 parent b8d15e3 commit 2580bc8
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cmt
Original file line number Diff line number Diff line change
@@ -14,4 +14,5 @@
}

${Type} (${Scope}): ${Short Message}

${Body}
53 changes: 53 additions & 0 deletions README.md
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.

0 comments on commit 2580bc8

Please sign in to comment.