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

hlw-uni-mp-cli

v1.0.1

Published

✨ UniApp 小程序脚手架生成器 - 支持微信/抖音等多平台

Downloads

22

Readme

UniApp Mini CLI - 通用小程序脚手架生成器

项目架构

hlw-uni-mp-cli/
├── bin/
│   └── cli.js                 # CLI 入口脚本
├── templates/                 # 项目模板
│   └── base/                  # 基础模板
│       ├── project.json       # 项目配置文件
│       ├── package.json
│       ├── vite.config.ts
│       ├── tsconfig.json
│       ├── index.html
│       ├── public/
│       └── src/
│           ├── App.vue
│           ├── main.ts
│           ├── manifest.json  # uniapp 应用清单
│           ├── pages.json     # 页面配置
│           ├── uni.scss       # 全局样式变量
│           │
│           ├── api/           # API 模块(可复用)
│           │   ├── index.ts
│           │   ├── request.ts # Axios 封装
│           │   └── modules/   # 分模块 API
│           │
│           ├── components/    # 通用组件
│           │   ├── List/
│           │   ├── Form/
│           │   └── Layout/
│           │
│           ├── composables/   # 组合式函数
│           │   ├── useRequest.ts
│           │   ├── useAuth.ts
│           │   └── useLoading.ts
│           │
│           ├── hooks/         # 业务 Hooks
│           │
│           ├── pages/         # 页面示例
│           │   ├── index/
│           │   ├── user/
│           │   └── demo/
│           │
│           ├── static/        # 静态资源
│           │
│           ├── store/        # 状态管理
│           │   ├── index.ts
│           │   ├── user.ts
│           │   └── app.ts
│           │
│           ├── styles/        # 样式
│           │   ├── variables.scss
│           │   └── common.scss
│           │
│           ├── types/         # TypeScript 类型
│           │   ├── api.d.ts
│           │   └── global.d.ts
│           │
│           ├── utils/         # 工具函数
│           │   ├── index.ts
│           │   ├── storage.ts
│           │   ├── format.ts
│           │   └── validate.ts
│           │
│           └── config/        # 配置文件
│               ├── index.ts
│               └── env.ts
│
├── scripts/
│   └── init.js               # 初始化脚本
│
├── package.json
├── README.md
└── bin.js                    # npm bin 入口

核心功能

1. CLI 命令

# 创建新项目(交互式选择平台和模板)
hlwuni create [project-name]

# 添加页面
hlwuni add page <page-name>

# 添加组件
hlwuni add component <component-name>

# 列出所有可用的平台和模板
hlwuni list

2. 模板变量(创建时替换)

  • {{name}} - 项目名称
  • {{description}} - 项目描述
  • {{author}} - 作者
  • {{version}} - 版本号
  • {{date}} - 创建日期

3. 内置功能

API 模块

  • 请求拦截器(自动携带 Token)
  • 响应拦截器(统一错误处理)
  • 错误重试机制
  • 请求缓存
  • 接口版本控制

组件库

  • 列表组件(支持下拉刷新、上拉加载)
  • 表单组件(支持验证)
  • 布局组件(头部、底部、侧边栏)
  • 常用业务组件

工具函数

  • Storage 封装(支持过期)
  • 格式化工具(日期、金额、手机号)
  • 验证工具(手机号、邮箱、身份证)
  • 加密解密工具