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

@yzlhdy/create-universal-app

v0.1.4

Published

Create a project from the private Universal App Template

Downloads

394

Readme

@yzlhdy/create-universal-app

从私有 yzlhdy/universal-app-template 母版的最新 main 创建一个全新的独立项目。

npx @yzlhdy/create-universal-app my-project

每次执行都会重新浅克隆最新母版,不复用上一次下载。已经创建的旧项目不会被修改,也不会自动同步后续母版更新。

使用要求

  • Node.js 24.15.0+
  • pnpm 12.1.0+
  • Git
  • 当前电脑的 GitHub SSH Key 有权访问私有仓库 yzlhdy/universal-app-template

先验证私有仓库访问权限:

git ls-remote ssh://[email protected]:443/yzlhdy/universal-app-template.git HEAD

CLI 不包含 GitHub Token 或 SSH 私钥,只使用当前电脑已有的 Git/SSH 身份。没有私有仓库权限时无法创建项目。

创建项目

交互式创建:

npx @yzlhdy/create-universal-app

或先给出目标目录:

npx @yzlhdy/create-universal-app my-project

未显式传入模式时,首先选择后台能力:

? 请选择后台能力
❯ 基础模式
  平台管理模式
  多租户平台模式
  • basic(默认):登录、个人资料、修改密码和登录会话。
  • platform:基础模式 + 平台用户、平台角色、平台权限和菜单管理。
  • multi-tenant:平台管理模式 + 租户、成员、租户角色与权限、数据隔离和协助访问。

缺少应用参数时,使用方向键选择:

? 请选择应用组合
❯ API + Admin + Web
  API + Admin + UniApp
  API + Admin + Web + UniApp

选择 Web 或 Web + UniApp 时,继续选择 Web UI 风格:

? 请选择 Web UI 风格
❯ Vega
  Nova

选择 UniApp-only 时不会询问 Web UI 风格。显式传入 --apps 和 --web-style 时会跳过对应选择,便于脚本自动化。

创建 API + Admin + Web:

npx @yzlhdy/create-universal-app my-web-project \
  --name my-web-project \
  --scope @my-web-project \
  --mode basic \
  --apps web \
  --web-style vega \
  --database my_web_project

创建 API + Admin + UniApp:

npx @yzlhdy/create-universal-app my-miniapp-project \
  --name my-miniapp-project \
  --scope @my-miniapp-project \
  --mode multi-tenant \
  --apps uniapp \
  --database my_miniapp_project

创建全部应用:

npx @yzlhdy/create-universal-app my-full-project \
  --name my-full-project \
  --scope @my-full-project \
  --mode multi-tenant \
  --apps both \
  --web-style vega \
  --database my_full_project

支持母版初始化器的其他参数:

  • --mode basic|platform|multi-tenant:选择后台能力模式。
  • --keep-demo:保留演示页面和假数据。
  • --skip-install:不安装依赖。
  • --skip-build:不生成 SDK 和执行首次构建。
  • --skip-git:不初始化新 Git 仓库。
  • --api-port、--admin-port、--web-port、--uni-port:设置本地端口。

目标目录必须不存在。生成项目不会包含母版 Git 历史,也不会包含母版专用的初始化和 npm Registry 发布工具。

发布 CLI

模板更新只需推送母版 main,不需要重新发布这个 npm 包。只有远程启动器自身发生变化时才发布新版本。

CLI 只能通过 create-universal-app-v<version> tag 触发 GitHub Actions Trusted Publishing 发布;不要在本机直接执行 npm publish。完整门禁、版本号和失败恢复流程见仓库 docs/maintenance/releases.md。