Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kokocan12 authored Jun 29, 2022
1 parent da3294f commit 1b81b4d
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,19 @@ You can insert your own types into package.json using CLI.
Using regular expression mode, commit messages of your project are tested by regular expression you insert.

# Usage
First, you add package into your project.
First, you add package info, meta data into your package.json.
```sh
$yarn add git-commit-msg-validator
```

Then, add **"git-commit-msg-validator"** to scripts > postinstall in your package.json.
```json
{
"name": "test",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"postinstall": "git-commit-msg-validator"
},
"dependencies": {
"git-commit-msg-validator": "^1.0.2"
}
}
```

Then, **yarn** again
```sh
$yarn
$npx git-commit-msg-validator
```

![image](https://user-images.githubusercontent.com/49009864/176138559-89f5ff6b-2094-4363-848b-538f4c8c27e6.png)

Select mode what you will use. <br/>
And enter types what you want to use.

That's it, Entered types are inserted into package.json automatically.
That's it.
Entered types are inserted into package.json.
And scripts, devDependencies, symbolic link of git hooks are created automatically.
```json
{
"name": "test",
Expand All @@ -55,7 +36,7 @@ That's it, Entered types are inserted into package.json automatically.
"scripts": {
"postinstall": "git-commit-msg-validator"
},
"dependencies": {
"devDependencies": {
"git-commit-msg-validator": "^1.0.2"
},
"git-commit-msg-validator": "[\"new-feature\", \"fix-bug\", \"update\", \"modify\"]"
Expand Down

0 comments on commit 1b81b4d

Please sign in to comment.