Skip to content

Generate the front-end current release git version number and the last commit information file

Notifications You must be signed in to change notification settings

BigFrontEnd-China/generateGitVersion

Repository files navigation

rollup-plugin-generate-git-version

🍣 A Rollup plugin Generate the front-end current release git version number and the last commit information file.

Requirements

This plugin requires an LTS Node version (v8.0.0+) and Rollup v1.20.0+.

Install

Using npm:

npm install rollup-plugin-generate-git-version --save-dev

Using pnpm:

pnpm install rollup-plugin-generate-git-version --save-dev

Usage

Create a rollup.config.js configuration file and import the plugin:

import generateGitVersion from "rollup-plugin-generate-git-version";

export default {
  input: "src/index.js",
  output: {
    dir: "output",
    format: "cjs",
  },
  plugins: [generateGitVersion({ fileName: "gitVersion.json" })],
};

Then call rollup either via the CLI or the API.

Options

fileName

Type: String
Default: "gitVersion.json"

About

Generate the front-end current release git version number and the last commit information file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published