Skip to content

Commit

Permalink
feat: ⬆️ upgrade to the latest gitmoji
Browse files Browse the repository at this point in the history
  • Loading branch information
vivaxy committed Aug 11, 2020
1 parent 74a5a83 commit 607a5b0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 486 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This extension helps you to fill in commit message according to
- Support auto commit and push after typing messages. See
[Commit Workflow](#commit-workflow) for details.
- Support project level scope management.
- Support gitmojis.
- Support [gitmojis](https://gitmoji.carloscuesta.me/).
- Support VSCode workspaces.

## Usage
Expand All @@ -34,7 +34,7 @@ You can access VSCode Conventional Commits in two ways:

The recommended workflow automatically add, commit and push files by default.

If you only want the extension to fill in the message, disable `autoCommit`
If you want the extension to only fill in the message, disable `autoCommit`
configuration.

### The Recommended Workflow
Expand All @@ -47,10 +47,12 @@ push the commit to remote.

### How To Configure

1. Enable `autoCommit` configuration of the extension. _The extension enables
`autoCommit` by default._
2. Enable `git.enableSmartCommit` and set `git.smartCommitChanges` to `all` to
commit all changes when there are no staged changes.
1. Enable `Settings > conventionalCommits.autoCommit` configuration of the
extension. _The extension enables `Settings > conventionalCommits.autoCommit`
by default._
2. Enable `Settings > git.enableSmartCommit` and set
`Settings > git.smartCommitChanges` to `all` to commit all changes when there
are no staged changes.
3. Set `Settings > git.postCommitCommand` to `sync` to run `git.sync` after
commit.

Expand All @@ -67,7 +69,7 @@ push the commit to remote.
## Troubleshooting

1. Switch to the VSCode `OUTPUT` tab, select `Conventional Commits`.
2. Copy all the output. Before sharing it, make sure you have omitted some
2. Copy all the output. Before sharing it, make sure you have removed all
private date.

![Debug instruction](./assets/docs/debug-instruction.png)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"dependencies": {
"@commitlint/load": "^9.0.0",
"@commitlint/rules": "^9.0.1",
"conventional-commit-types": "^3.0.0"
"conventional-commit-types": "^3.0.0",
"gitmojis": "^2.1.0"
}
}
10 changes: 9 additions & 1 deletion src/lib/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
* @author vivaxy
*/
const conventionalCommitsTypes = require('conventional-commit-types');
const gitmojis: {
gitmojis: {
emoji: string;
entity: string;
code: string;
description: string;
name: string;
}[];
} = require('gitmojis');

import * as configuration from './configuration';
import gitmojis from '../vendors/gitmojis';
import promptTypes, { PROMPT_TYPES, Prompt } from './prompts/prompt-types';
import * as names from '../configs/names';
import CommitMessage from './commit-message';
Expand Down
Loading

0 comments on commit 607a5b0

Please sign in to comment.