npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@develop-plugins/vite-plugin-git-tag

v0.9.0

Published

vite插件,根据git tag生成版本号

Readme

vite-plugin-git-tag

一个 Vite 插件,用于在构建过程中自动创建 Git Tag 标签。

功能特性

  • 🎯 自动创建 Tag:在 Vite 构建完成后自动触发 Tag 创建流程
  • 🔄 交互式操作:支持选择分支、提交记录,输入 Tag 名称和说明
  • 📤 自动同步:创建成功后自动同步到远程仓库
  • 智能检测:自动检测 Tag 是否已存在,避免重复创建

安装

npm install @develop-plugins/vite-plugin-git-tag --save-dev

# 或使用 pnpm
pnpm add @develop-plugins/vite-plugin-git-tag -D

使用方法

基础使用

vite.config.js 中配置插件:

import { defineConfig } from "vite";
import vitePluginGitTag from "@develop-plugins/vite-plugin-git-tag";

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

自定义配置

import { defineConfig } from "vite";
import vitePluginGitTag from "@develop-plugins/vite-plugin-git-tag";

export default defineConfig({
  plugins: [
    vitePluginGitTag({
      isCreatedTag: true, // 是否创建 Tag
      commitCount: 10, // 显示的提交记录数量
      isSyncTag: true, // 是否同步到远程仓库
    }),
  ],
});

配置选项

| 选项 | 类型 | 默认值 | 说明 | | -------------- | --------- | ------ | ---------------------------- | | isCreatedTag | boolean | true | 是否在构建后创建 Tag | | commitCount | number | 10 | 显示的提交记录数量 | | isSyncTag | boolean | true | 创建成功后是否同步到远程仓库 |

工作流程

  1. 构建完成:Vite 构建结束后自动触发插件
  2. 选择分支:从本地分支列表中选择目标分支
  3. 选择提交:从指定分支的最近提交记录中选择目标提交
  4. 输入信息:输入 Tag 名称(默认当前日期)和说明信息
  5. 创建验证:检查 Tag 是否已存在,若存在则重新输入
  6. 创建推送:创建本地 Tag 并推送到远程仓库
  7. 同步更新:从远程仓库同步 Tag 列表到本地

使用示例

示例 1:禁用自动创建

vitePluginGitTag({
  isCreatedTag: false, // 禁用自动创建 Tag
});

示例 2:自定义提交记录数量

vitePluginGitTag({
  commitCount: 20, // 显示最近 20 条提交记录
});

示例 3:禁用远程同步

vitePluginGitTag({
  isSyncTag: false, // 仅创建本地 Tag,不推送到远程
});