Skip to content

Commit be60087

Browse files
committed
Update: prefix to type (closes #4)
1 parent c56c0be commit be60087

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ $ sgc
3737
3838
**Keys**
3939

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
40+
- `type` - 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 type is about
4242
- `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/))
4343

4444
The `.sgcrc`:
@@ -48,8 +48,8 @@ The `.sgcrc`:
4848
"types": [
4949
{
5050
"emoji": ":sparkles:",
51-
"prefix": "Feat:",
52-
"description": "Any description to describe the prefix"
51+
"type": "Feat:",
52+
"description": "Any description to describe the type"
5353
}
5454
]
5555
}
@@ -65,8 +65,8 @@ The `package.json`:
6565
"types": [
6666
{
6767
"emoji": ":sparkles:",
68-
"prefix": "Feat:",
69-
"description": "Any description to describe the prefix"
68+
"type": "Feat:",
69+
"description": "Any description to describe the type"
7070
}
7171
]
7272
}

lib/sgcPrompt.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ const sgcPrompt = () => {
99

1010
config.types.forEach((type) => {
1111
const emoji = `${type.emoji} ` || '';
12-
const prefix = type.type;
12+
const configType = type.type;
1313
const description = type.description || '';
1414

1515
choices.push({
16-
value: emoji + prefix,
17-
name: `${chalk.bold(prefix)} ${description}`,
16+
value: emoji + configType,
17+
name: `${chalk.bold(configType)} ${description}`,
1818
});
1919
});
2020

0 commit comments

Comments
 (0)