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

create-fz-stack

v0.1.6

Published

A CLI to bootstrap projects from built-in templates.

Readme

create-fz-stack

一个基于 TypeScript 的 CLI,用于从内置模板快速创建项目。

安装

yarn global add create-fz-stack

使用

create-fz-stack

或直接一次性执行:

yarn create fz-stack

命令格式:

create-fz-stack [directory] [options]

参数说明:

  • -h, --help:显示帮助信息
  • -t, --template <name>:指定模板(当前支持 react-tailwindreact-tailwind-antdreact-router-tailwindreact-router-tailwind-antd
  • --overwrite:当目标目录非空时,删除原有文件后继续
  • -i, --immediate:创建完成后立即安装依赖
  • --interactive:强制开启交互模式
  • --no-interactive:强制关闭交互模式

当前内置模板:

  • react-tailwind
  • react-tailwind-antd
  • react-router-tailwind
  • react-router-tailwind-antd

模板指南

如果你要新增或维护模板,按下面流程即可:

  1. templates/ 下新增模板目录(例如 templates/my-template)。
  2. 准备模板文件(如 package.jsonsrc/index.html 等)。
  3. src/config.tsCATEGORY_CATALOG 中注册模板:
    • id:CLI 识别用的模板标识(建议与目录名一致)
    • label:交互列表展示名
    • description:交互提示文案
    • folder:模板目录名
    • color:展示颜色
  4. 如果模板支持“可选依赖多选”,在模板项里配置 optionalDependencies(可复用并 omit 公共依赖集合)。
  5. 运行 yarn test 验证 CLI 与配置逻辑。

注意事项:

  • 模板内 package.jsonname 会在创建项目时自动替换为用户输入的项目名。
  • 发布包时会排除 templates/**/yarn.lock,避免 lock 文件进入 npm 包。

交互流程:

  1. 输入项目名(默认 my-project
  2. 选择分类(当前为 frontend
  3. 选择模板(支持 ← Back to category 返回上一步)
  4. 当模板配置了可选依赖时,进行多选
  5. 默认勾选依赖:antdaxioszustand(仅在对应模板中生效)
  6. 可选依赖使用固定版本写入 package.json
  7. 选择是否立刻安装依赖(自动识别包管理器,如 npm / yarn / pnpm

当目标目录非空时,交互模式会提供以下选项:

  • 取消操作
  • 删除已有文件并继续
  • 忽略已有文件并继续

本地开发

yarn install
yarn build
yarn test
yarn test-create
yarn test-create -h
yarn check-deps-updates
node dist/src/cli.js

依赖更新检查

执行以下命令可检查根项目与 templates/*/package.json 的依赖更新:

yarn check-deps-updates

脚本会检查以下位置:

  • 根目录 package.json
  • templates/*/package.json
  • src/config.tsFRONTEND_OPTIONAL_DEPENDENCIESversion

当检测到可更新依赖时,会先汇总展示,再一次性询问是否全部写回(y/N)。

发布检查清单

  1. 更新 package.json 中的版本号
  2. 执行 yarn test
  3. 发布到 npm:
npm publish --access public