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

pigx-gen

v6.0.0

Published

PIGX module generator rewritten in TypeScript

Readme

5.6 后版本,不需要手动安装,已经上传至 Maven 中央仓库,直接按文档在 CMD 命令行执行生产命令就行啦

pigx-gen是什么

pigx-gen是自定义的archetype,通过使用pigx-gen archetype可以生成满足我们项目需求的工程模板,提高开发效率的同时可以统一团队内的项目结构风格

TypeScript 版本使用

TypeScript 版本用于在已有 PIGX 工程根目录中新增业务模块。必须在 PIGX 根目录执行,也就是当前目录必须存在根 pom.xml,并且该 pom.xml 需要是 packaging=pom 且包含 modules 节点。

CLI 会自动读取根 pom.xml 中的 groupIdartifactIdversion,默认使用 Spring Boot 4 模板并自动生成 Java 包名。Spring Boot 4 模板使用 mybatis-plus-spring-boot4-starterdruid-spring-boot-4-starterspring-boot-starter-webmvc,不再生成 Undertow 依赖。生成完成后,会自动在根 pom.xmlmodules 中追加新增模块。

交互式创建

cd pigx
npx [email protected]

执行后在 TUI 中输入模块名 artifactId,例如 demo,并选择 Spring Boot 版本。 Spring Boot 版本可选择 234,默认是 4。 Web 容器跟随 Spring Boot Web starter 默认配置,当前模板不额外声明 Tomcat 或 Undertow。

非交互式创建

cd pigx
npx [email protected] demo --yes

等价写法:

npx [email protected] --module demo --yes

指定 Spring Boot 版本:

npx [email protected] --module demo --springboot-version 4 --yes

生成结果:

pigx
├── pom.xml                  # 自动追加 <module>demo</module>
└── demo
    ├── pom.xml
    ├── demo-api
    └── demo-biz

可选参数:

pigx-gen
pigx-gen <module-name>

参数:
  -m, --module <name>       新模块 artifactId
  --springboot-version <n>  Spring Boot 版本,可选 2、3、4,默认 4
  -y, --yes                 使用默认值,不进入交互
  -h, --help                显示帮助
  -v, --version             显示版本

未修改包名版本使用

  • 此工程不可直接运行

未修改包名的PIGX项目使用请参考此文档: https://pig4cloud.com/data/doc/pigx/quick-start/pigx-new-app.html

已经修改包名版本 (专属版本)使用

  • ① 解压专属版本申请的文件包,解压 xx-gen.zip

1676447534

  • ② 切换至 xx-gen 根目录执行安装
cd xx-gen
mvn clean install
  • ③ 任意空目录执行创建骨架项目测试

注意查看申请专属版本的邮件关于 如何使用 gen.zip 部分,命令根据实际执行

mvn archetype:generate \
       -DspringbootVersion=4 \
       -DgroupId=com.pig4cloud \
       -DartifactId=demo \
       -Dversion=6.0.0 \
       -DarchetypeGroupId=com.pig4cloud.archetype \
       -DarchetypeArtifactId=pigx-gen \
       -DarchetypeVersion=6.0.0 \
       -DarchetypeCatalog=local \
       -DinteractiveMode=false