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

hzy-uni-cli

v0.0.2

Published

基于 hzy-uni-template 的 UniApp 项目脚手架工具

Downloads

3

Readme

hzy-uni-cli

基于 hzy-uni-template 的 UniApp 项目脚手架工具,快速创建 UniApp 项目。

🚀 特性

  • 🎯 一键生成 - 基于成熟的 hzy-uni-template 模板
  • 🛠 交互式配置 - 友好的命令行交互界面
  • 📦 自动配置 - 自动更新项目配置文件
  • 🔧 完整结构 - 生成完整可运行的项目结构
  • 高性能 - 包含性能优化的主题系统

📦 安装

全局安装(推荐)

npm install -g hzy-uni-cli
# 或
pnpm add -g hzy-uni-cli
# 或
yarn global add hzy-uni-cli

使用 npx(无需安装)

npx hzy-uni-cli my-project

本地开发测试

在进行本地开发测试时,可以使用以下方法:

  1. 使用 npm link

    首先,在项目根目录下运行以下命令:

    npm link

    这会将当前项目链接到全局 npm 模块目录,使全局安装的 hzy-uni-cli 可以使用本地项目的代码。

  2. 创建测试项目

    然后,在另一个目录下创建一个新的项目,用于测试全局安装的 hzy-uni-cli:

    mkdir test-project
    cd test-project
    hzy-uni-cli

    这会使用全局安装的 hzy-uni-cli 创建一个新的项目。

  3. 测试全局安装

    确保全局安装的 hzy-uni-cli 可以正常工作。您可以在测试项目中运行 hzy-uni-cli 命令,检查是否能够创建项目。

    您可以在测试项目中运行 hzy-uni-cli 命令,检查是否能够创建项目。

    确保全局安装的 hzy-uni-cli 可以正常工作。您可以在测试项目中运行 hzy-uni-cli 命令,检查是否能够创建项目。

🎯 使用方法

创建新项目

# 使用全局安装的命令
hzy-uni-cli my-project

# 或使用 npx
npx hzy-uni-cli my-project

交互式配置

运行命令后,会提示您输入以下信息:

  • 项目描述 - 项目的简短描述
  • 作者名称 - 项目作者
  • UniApp AppID - UniApp 应用 ID(可选)
  • 微信小程序 AppID - 微信小程序 AppID(可选)
  • 后台服务地址 - API 服务器地址
  • 文件上传地址 - 文件上传服务器地址

完成后的步骤

cd my-project
pnpm install
pnpm dev:h5

📁 生成的项目结构

my-project/
├── env/                    # 环境配置
│   ├── .env               # 基础配置
│   ├── .env.development   # 开发环境
│   └── .env.production    # 生产环境
├── src/
│   ├── components/        # 组件
│   ├── pages/            # 页面
│   ├── store/            # 状态管理
│   ├── utils/            # 工具函数
│   └── ...
├── package.json          # 项目配置
├── manifest.config.ts    # UniApp 配置
├── vite.config.ts        # Vite 配置
└── README.md            # 项目说明

🎨 包含的功能

核心技术栈

  • Vue 3 + TypeScript + Vite
  • UniApp 跨端开发框架
  • UnoCSS 原子化 CSS
  • Pinia 状态管理

高性能主题系统

  • 主题切换耗时优化 66%(150ms → 50ms)
  • CSS 变量批量处理
  • 防抖机制和硬件加速
  • 内存泄漏预防

开发工具

  • ESLint + Prettier 代码规范
  • TypeScript 严格模式
  • 自动导入配置
  • 性能监控工具

🔧 配置说明

自动更新的配置文件

  1. package.json - 项目名称、描述、作者等
  2. manifest.config.ts - UniApp 配置、AppID 等
  3. env/.env - 环境变量配置
  4. README.md - 项目文档

环境变量

生成的项目包含以下环境变量:

# 应用信息
VITE_APP_TITLE='your-project-name'
VITE_UNI_APPID='your-uni-appid'
VITE_WX_APPID='your-wx-appid'

# 服务配置
VITE_SERVER_BASEURL='https://api.example.com'
VITE_UPLOAD_BASEURL='https://upload.example.com'

🚀 快速开始

1. 创建项目

npx hzy-uni-cli my-awesome-app

2. 安装依赖

cd my-awesome-app
pnpm install

3. 启动开发服务器

# H5 开发
pnpm dev:h5

# 微信小程序开发
pnpm dev:mp-weixin

# App 开发
pnpm dev:app

4. 构建生产版本

# H5 构建
pnpm build:h5

# 微信小程序构建
pnpm build:mp-weixin

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License