Skip to content

Commit 5808b79

Browse files
committed
✏️ docs: add usage and example
1 parent 633d7ac commit 5808b79

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

.releaserc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
releaseRules: {
88
major: [':boom:'],
99
minor: [':sparkles:'],
10-
patch: [':bug:', ':package:', 'construction']
10+
patch: [':bug:', ':package:', 'construction', ':pencil2:']
1111
}
1212
}
1313
],

README.md

+22-25
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ A Commitlint plugin to ensure that commits are made using imperative mood.
3131
<p align="center">
3232
<a href="#information_source-about">About</a> •
3333
<a href="#arrow_forward-installation">Installation</a> •
34-
<a href="#hammer_and_wrench-technologies">Technologies</a> •
35-
<a href="#hammer_and_wrench-commands">Commands</a> •
34+
<a href="#hammer_and_wrench-technologies">Usage</a> •
3635
<a href="#boy-author">Author</a> •
3736
<a href="#balance_scale-license">License</a>
3837
</p>
@@ -41,7 +40,9 @@ A Commitlint plugin to ensure that commits are made using imperative mood.
4140

4241
<div align="center">
4342

44-
Command-line interface (CLI) built in Node.js allow you to automate repetitive tasks and make your life easier when working with Angular projects.
43+
If you want to write a git commit message properly, you should use the imperative mood. This means you need to eliminate the temptation to use gerunds or past tense in your subject lines. Don't write a git commit subject line that talks about what you did, or what you are doing. Instead, describe what was done.
44+
45+
Use this plugin to enforce this rule.
4546

4647
---
4748

@@ -51,38 +52,34 @@ Command-line interface (CLI) built in Node.js allow you to automate repetitive t
5152

5253
```bash
5354
#install
54-
npm install @ngx-devs/cli -g
55-
56-
#run some command
57-
ngxd g c sample
55+
npm install -D @ngx-devs/commitlint-plugin-imperative
5856
```
5957

6058
---
6159

62-
## :hammer_and_wrench: **Technologies**
63-
64-
<div align="center">
65-
66-
| :globe_with_meridians: CLI |
67-
| :------------------------------------------------------------------------------------: |
68-
| [Gluegun](https://www.npmjs.com/package/gluegun) |
69-
| [@angular-devkit/schematics](https://www.npmjs.com/package/@angular-devkit/schematics) |
70-
| [TypeScript](https://www.typescriptlang.org/) |
60+
## :robot: Usage
7161

72-
</div>
73-
74-
## :robot: Commands
62+
Set your commitlint config to:
7563

7664
```bash
77-
# create a new project
78-
ngxd new <project-name>
65+
{
66+
plugins: ["@ngx-devs/commitlint-plugin-imperative"],
67+
rules: {
68+
"imperative-rule/en": [2, "always", ]
69+
}
70+
}
7971
```
8072

73+
## Example
74+
8175
```bash
82-
# create a new entity
83-
ngxd generate component <component-name>
84-
# Or use an alias
85-
ngxd g c <component-name>
76+
$ git commit -m "adding a project"
77+
⧗ input: adding a project
78+
✖ This commit is in the gerund. Please use the imperative form. [imperative-rule/en]
79+
80+
✖ found 1 problems, 0 warnings
81+
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
82+
8683
```
8784

8885
## :boy: **Author**

0 commit comments

Comments
 (0)