0.1.9 • Published 4 years ago

vite-plugin-git-revision v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

vite-plugin-pages

npm version monthly downloads

Git version info for Vue 3 applications using Vite

Getting Started

Install:

$ npm install -D vite-plugin-git-revision

Add to your vite.config.js:

import Vue from '@vitejs/plugin-vue';
import GitRevision from 'vite-plugin-git-revision';

export default {
  plugins: [
    Vue(), 
    GitRevision()
  ],
};

Configuration

To use custom configuration, pass your options to Pages when instantiating the plugin:

// vite.config.js
import GitRevision from 'vite-plugin-git-revision';

export default {
  plugins: [
    GitRevision({
      lightweightTags:false,
      branch:false,
      versionCommand:'describe --tags --long --dirty --always',
      commithashCommand:'',
      branchCommand:'',
    }),
  ],
};

lightweightTags

  • Type: boolean
  • Default: false

lightweight tags support.

branch

  • Type: boolean
  • Default: false

branch tags support.

versionCommand

  • Type: string
  • Default: describe --always

change the default git command used to read the value of VERSION.

commithashCommand

  • Type: string
  • Default: rev-parse HEAD

change the default git command used to read the value of COMMITHASH.

branchCommand

  • Type: string
  • Default: rev-parse --abbrev-ref HEAD

change the default git command used to read the value of BRANCH.

License

MIT License © 2021 qduld

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

1.1.1

4 years ago