1.0.0 ā€¢ Published 2 years ago

rollup-plugin-generate-git-version v1.0.0

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

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