# inject-version

> CLI tool to inject version into your source code when prepublishOnly.

Latest version **1.0.0** (published 2020-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install inject-version
pnpm add inject-version
yarn add inject-version
bun add inject-version
```

Provides the command `inject-version`.

## 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.0 |
| Published | 2020-09-21 |
| First published | 2020-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | atool |
| Keywords | version, inject-version |

## Links

- npm: https://www.npmjs.com/package/inject-version
- npm.io page: https://npm.io/package/inject-version

## Dependencies (3)

- [tplv](https://npm.io/package/tplv.md) ^1.0.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [commander](https://npm.io/package/commander.md) ^6.1.0

## Recent versions

- 1.0.0 (latest) — 2020-09-21
- 0.0.1-beta.1 — 2020-09-21

## README

# inject-version

> CLI tool to inject `version` into your source code when `prepublishOnly`.

[![npm Version](https://img.shields.io/npm/v/inject-version.svg)](https://www.npmjs.com/package/inject-version)
[![Build Status](https://github.com/hustcc/inject-version/workflows/build/badge.svg)](https://github.com/hustcc/inject-version/actions)
[![npm](https://img.shields.io/npm/dm/inject-version.svg)](https://www.npmjs.com/package/inject-version)
[![npm License](https://img.shields.io/npm/l/inject-version.svg)](https://www.npmjs.com/package/inject-version)


## Install

```bash
$ npm i --save-dev inject-version
```


## Usage

 - Add the `prepublishOnly` script to your `package.json` with `inject-version`:

```diff
  "scripts": {
+   "prepublishOnly": "inject-version ./src/index.ts",
    "test": "jest"
  },
```


## License

MIT@[hustcc](https://github.com/hustcc).

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