1.0.7 • Published 12 months ago

vite-plugin-git-version v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

English | 中文

It is better to use with watone tools power builder

Microsoft Store Download

Use Documentation

Get the version information from package.json, then automatically put the version file version.json in your project dist folder when packaging.

// package.json
{
  // ...
  "name": "vite-plugin-git-version",
  "version": "1.0.0"
}
// dist/version.json
{
  "name": "vite-plugin-git-version",
  "version": "1.0.0",
  "branch": "(HEAD -> main, origin/main, origin/HEAD)",
  "hash": "3e85fdd2e0aeac7685e3d20da16ff979440cbcb8",
  "commitUser": "xkloveme (xkloveme@gmail.com)",
  "commitContent": "chore: 更新README和package.json中的依赖信息\n更新版本\nchore: release v1.0.4",
  "time": "2024-08-09 22:13:11"
}

Install

pnpm add vite-plugin-git-version
yarn add vite-plugin-git-version
npm i vite-plugin-git-version

Add plugin to your vite.config.ts or vite.config.js:

// vite.config.ts
import { defineConfig } from 'vite'
import VersionGitPlugin from 'vite-plugin-git-version'

export default defineConfig({
  plugins: [
    VersionGitPlugin(),
  ],
})

License

MIT License © 2024 xkloveme

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago