1.2.0 • Published 1 year ago

branch-info-plugin v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

branch-info-plugin

webpackvite 插件,获取最后一次 git 提交信息并输出到打包根目录下 lastGitInfo.txt ,方便线上版本溯源。

Install

npm install branch-info-plugin

Usage

import { BranchInfoWebpackPlugin, vitePluginBranchInfo } from 'branch-info-plugin'

// 遵循webpack和vite plugin 命名规范
// in webpack
plugins: [new BranchInfoWebpackPlugin({outputFile: 'commit.txt'})]

// in vite
plugins: [vitePluginBranchInfo({outputFile: 'commit.txt'})]

Props

名称说明类型是否必选
outputFile要输出文件名,默认 lastGitInfo.txtstring

Example

打包完成输出内容:

    当前分支名:rhwoodpecker/master

    提交的hash:cd7994775050d4252312466d3e7c937b567

    提交人姓名:‘renhao’

    提交日期:2023-02-24 18:07:10

    提交描述:chore: update README.md
  
1.2.0

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago