Skip to content

Commit

Permalink
docs(git-hooks): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Mar 9, 2023
1 parent 9deec0b commit c354166
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-cups-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zanminkian/git-hooks": patch
---

docs(git-hooks): update README
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# git-hooks
# @zanminkian/git-hooks

[![](https://img.shields.io/npm/l/@zanminkian/git-hooks.svg)](https://github.com/zanminkian/git-hooks/blob/master/LICENSE)
[![](https://img.shields.io/npm/v/@zanminkian/git-hooks.svg)](https://www.npmjs.com/package/@zanminkian/git-hooks)
[![](https://img.shields.io/npm/dm/@zanminkian/git-hooks.svg)](https://www.npmjs.com/package/@zanminkian/git-hooks)

A bundle of opinionated git hooks. All in one!

## Feature

- Easy to use. Just install it. It will lint your staged code and commit message automatically before git commit.
- Easy to use. Just install it. It will lint your staged code and committed message automatically before git commit.
- Zero Configs. Reasonable default settings for enterprise app.

## Usage

Setup `postinstall` script in your `package.json`. And then install.
Setup `postinstall` script in your `package.json`.

```json
{
Expand All @@ -19,12 +23,21 @@ Setup `postinstall` script in your `package.json`. And then install.
}
```

And then install it.

```sh
pnpm add -D @zanminkian/git-hooks
```

After that, `@zanminkian/git-hooks` will check your code and your commit message when you commit your code.

## How it works

After running `git-hooks install`, it will write `commit-msg` file and `pre-commit` file to `{PROJECT_ROOT}/.git/hooks` directory.

- The `commit-msg` file will lint your git commit message before git commit.
- The `pre-commit` file will lint your staged code before git commit.

## License

MIT
19 changes: 16 additions & 3 deletions packages/git-hooks/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# git-hooks
# @zanminkian/git-hooks

[![](https://img.shields.io/npm/l/@zanminkian/git-hooks.svg)](https://github.com/zanminkian/git-hooks/blob/master/LICENSE)
[![](https://img.shields.io/npm/v/@zanminkian/git-hooks.svg)](https://www.npmjs.com/package/@zanminkian/git-hooks)
[![](https://img.shields.io/npm/dm/@zanminkian/git-hooks.svg)](https://www.npmjs.com/package/@zanminkian/git-hooks)

A bundle of opinionated git hooks. All in one!

## Feature

- Easy to use. Just install it. It will lint your staged code and commit message automatically before git commit.
- Easy to use. Just install it. It will lint your staged code and committed message automatically before git commit.
- Zero Configs. Reasonable default settings for enterprise app.

## Usage

Setup `postinstall` script in your `package.json`. And then install.
Setup `postinstall` script in your `package.json`.

```json
{
Expand All @@ -19,12 +23,21 @@ Setup `postinstall` script in your `package.json`. And then install.
}
```

And then install it.

```sh
pnpm add -D @zanminkian/git-hooks
```

After that, `@zanminkian/git-hooks` will check your code and your commit message when you commit your code.

## How it works

After running `git-hooks install`, it will write `commit-msg` file and `pre-commit` file to `{PROJECT_ROOT}/.git/hooks` directory.

- The `commit-msg` file will lint your git commit message before git commit.
- The `pre-commit` file will lint your staged code before git commit.

## License

MIT
3 changes: 2 additions & 1 deletion packages/git-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"opinionated",
"git",
"hooks",
"git-hooks"
"git-hooks",
"pre-commit"
],
"bin": {
"git-hooks": "bin/git-hooks",
Expand Down

0 comments on commit c354166

Please sign in to comment.