# vue-cli-plugin-build-version

> vue-cli plugin to generate build version file.

Latest version **1.0.6** (published 2021-05-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-cli-plugin-build-version
pnpm add vue-cli-plugin-build-version
yarn add vue-cli-plugin-build-version
bun add vue-cli-plugin-build-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.6 |
| Published | 2021-05-14 |
| First published | 2020-09-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yinzhenyu |
| Maintainers | yinzhenyu |
| Keywords | vue build version, vue-build-version, vue-cli-plugin-build-version |

## Links

- npm: https://www.npmjs.com/package/vue-cli-plugin-build-version
- Repository: https://github.com/yinzhenyu-su/vue-cli-plugin-build-version
- Homepage: https://github.com/yinzhenyu-su/vue-cli-plugin-build-version#what-is-this
- Issues: https://github.com/yinzhenyu-su/vue-cli-plugin-build-version/issues
- npm.io page: https://npm.io/package/vue-cli-plugin-build-version

## Dependencies (1)

- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.6.2

## Recent versions

- 1.0.6 (latest) — 2021-05-14
- 1.0.5 — 2021-04-27
- 1.0.4 — 2020-10-22
- 1.0.3 — 2020-09-23

## README

# what is this

this is a vue-cli-plugin that to generate version.json file for vue-cli project.

the content should like this

```js
{
  "date": "2020-09-23 11:11:11", // last build date
  "cvs": "git", // cvs type
  "rev": "a4f56gf" // cvs short HEAD rev
}
```

---

## how to use it

1. install from you node package manager.

   ```js
   npm install vue-cli-plugin-build-version
   ```

   or

   ```js
   vue add vue-cli-plugin-build-version
   ```

2. put below config in **vue.config.js**

   ```js
   pluginOptions: {
     buildVersion: {
       path: require('path').resolve('dist'), // build root dir
       env: require('process').env, // env obj
       cvs: 'git', // cvs type, git or svn
       versionPath: '' // version file parent dir, empty string for default
       name: '', // version file name, empty string for default
     }
   }
   ```

3. put below config in **package.json** `scripts` fields

   ```json
   "buildVersion": "vue-cli-service build-version"
   ```

4. run `npm run buildVersion`


## Change log

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