# parcel-plugin-package-version

> Parcel plugin to read version from package.json

Latest version **1.0.2** (published 2020-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install parcel-plugin-package-version
pnpm add parcel-plugin-package-version
yarn add parcel-plugin-package-version
bun add parcel-plugin-package-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.2 |
| Published | 2020-04-16 |
| First published | 2020-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 287.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mehdi |
| Maintainers | mehdi_s |
| Keywords | package.json, version, parcel, parcel-bundler, parcel-plugin |

## Links

- npm: https://www.npmjs.com/package/parcel-plugin-package-version
- Repository: https://github.com/mehdi-sp/parcel-plugin-package-version
- Homepage: https://github.com/mehdi-sp/parcel-plugin-package-version#readme
- Issues: https://github.com/mehdi-sp/parcel-plugin-package-version/issues
- npm.io page: https://npm.io/package/parcel-plugin-package-version

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-04-16
- 1.0.1 — 2020-03-23
- 1.0.0 — 2020-03-22

## README

# parcel-plugin-package-version

Parcel plugin to read version from package.json

## Install

```
# npm
npm i -D parcel-plugin-package-version

# or yarn
yarn add -D parcel-plugin-package-version
```

## How to use

This plugin puts the package version in an environment variable named `PACKAGE_VERSION`.  
you can retrive it in js like this: `process.env.PACKAGE_VERSION`

### Example

_**package.json**_

```
{
  "version": "1.2.3",
  ...
}
```

_**javascript**_

```
console.log("package version: " + process.env.PACKAGE_VERSION);
```

_**output**_

```
package version: 1.2.3
```

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