# git-hash-package

> Get git hash and set in package.json

Latest version **1.0.6** (published 2017-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-hash-package
pnpm add git-hash-package
yarn add git-hash-package
bun add git-hash-package
```

Provides the command `git-hash-package`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2017-11-11 |
| First published | 2017-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vladimir Metnew |
| Maintainers | metnew |
| Keywords | git, git-hash, hash, package, versioning, version |

## Links

- npm: https://www.npmjs.com/package/git-hash-package
- Repository: https://github.com/Metnew/git-hash-package
- Homepage: https://github.com/Metnew/git-hash-package#readme
- Issues: https://github.com/Metnew/git-hash-package/issues
- npm.io page: https://npm.io/package/git-hash-package

## Dependencies (7)

- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [pkg-up](https://npm.io/package/pkg-up.md) ^2.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [read-pkg](https://npm.io/package/read-pkg.md) ^3.0.0
- [write-pkg](https://npm.io/package/write-pkg.md) ^3.1.0
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^3.0.0
- [git-rev-sync](https://npm.io/package/git-rev-sync.md) ^1.9.1

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2017-11-11
- 1.0.5 — 2017-11-11
- 1.0.0 — 2017-08-03
- 0.0.4 — 2017-08-03
- 0.0.3 — 2017-08-03
- 0.0.2 — 2017-08-03
- 0.0.1 — 2017-08-03

## README

# git-hash-package

### What does it do?
This package gets info about your git repo (*long hash* + *short hash* + *branch*) and stores this data in your `package.json`.

### Why?
I faced next issue:  
If we can't use `git log` inside Docker container in git subrepo in production, we need to store info about git in local files. Storing info about the current git state in `package.json` was a good decision.
This module solves my issue.

### Install
```bash
npm i git-hash-package
```

Or if you want to run it globally(Thanks to [@teebu](https://github.com/teebu) and his awesome PR):

```
  npm i -g git-hash-package
```

### Usage
```bash
git-hash-package # run
git-hash-package --verbose # run with verbose output about current git state (short + long hashes + branch)
```

### Author
Vladimir Metnew <vladimirmetnew@gmail.com>

### License
MIT

---
_Source: https://npm.io/package/git-hash-package · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
