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

zy-gbs-cmd

v1.1.4

Published

`zy-gbs-cmd` 用于构建前端项目,并将构建产物提交到业务项目配置的 Java Git 仓库。

Readme

zy-gbs-cmd

zy-gbs-cmd 用于构建前端项目,并将构建产物提交到业务项目配置的 Java Git 仓库。

工具不调用授权接口,也不保存账号密码。Git 克隆和推送使用当前电脑已有的 Git 凭据。

环境要求

  • Node.js 18 或更高版本
  • Git
  • Yarn

工具使用的模块均为 Node.js 内置模块,无需安装运行时依赖。

业务项目的依赖安装和项目构建只使用 Yarn;Windows 下会自动调用 yarn.cmd。

安装

安装已发布版本可以使用 npm 或 Yarn:

npm install -g zy-gbs-cmd
yarn global add zy-gbs-cmd

本地安装当前目录:

npm install -g 

业务项目配置

在业务项目根目录创建或修改 jjb.config.js:

javaGit 必须是完整的 Git 克隆地址,不能只填写 Git 服务地址。jsconfig.json

创建项目

在存放项目根目录执行:

zy-gbs-cmd create

根据提示输入项目目录名并选择模板:

1. 1.0(Ant Design 5)
2. 2.0(Ant Design 6)

工具会为 javaGit、javaGitName、appIdentifier 和 production 分支生成默认值,直接回车即可使用,也可以手动输入。项目名或 Java Git 仓库名末尾的 -react 或 _react 会被去除;appIdentifier 再根据最终 javaGit 的仓库名去除 zcloud_gbs_、_gwj 后转换为小驼峰。

创建成功后模板自带的 Git 记录会被删除,工具不会自动安装依赖。进入新项目后手动执行:

yarn install

推送项目

在业务项目根目录执行:

zy-gbs-cmd push java

也可以直接指定环境:

zy-gbs-cmd push java production

指定环境后会自动执行同名构建脚本,例如 production 对应 build:production,不再询问构建命令和环境。

工具会把:

dist/index.html
dist/<appIdentifier>/

复制到 Java 仓库:

start/src/main/resources/templates/<appIdentifier>.html
start/src/main/resources/templates/<appIdentifier>/

工具只暂存和提交当前应用在 templates 下的目录及 HTML,不会提交 Java 仓库其他路径的文件。

有构建产物变化时会提示输入 Git 提交信息;直接回车或等待 60 秒未确认,将自动使用默认提交信息继续提交。

发布到 npm Registry

登录 Registry:

yarn login

首次发布:

yarn publish

后续发布前需要先更新版本号,例如:

yarn version --patch
yarn publish