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

@dcloudio/uni-app-x

v0.7.122

Published

uni-app x types

Downloads

4,494

Readme

uni-app x 类型

配置环境

当前目录建立 .env 文件。

UNI_CORE_DIR="%vuejs-core 仓库路径%/packages/uni-ext-api/src"
UNI_UTS_PLUGIN_API_DIR="%新 uni-app 仓库路径%/api"
UNI_UTS_PLUGIN_MODULES_DIR="%dcloud-uts 仓库路径%/uni_modules"
UNI_COMPLIER_META_DIR="%旧 uni-app 仓库路径%/packages/uni-uts-v1/lib/ext-api"
# 可选。不配置时默认使用项目根目录下的 .uni-module-projects-cache
UNI_MODULE_PROJECTS_CACHE_DIR="%插件项目缓存目录%"

聚合单独插件项目

单独插件项目通过 scripts/uni-module-projects.json 配置,构建时会自动聚合并同步到当前仓库对应分支。

[
  {
    "name": "uni-im",
    "repo": "git@your-git-host:team/uni-im.git"
  },
  {
    "name": "uni-pay",
    "repo": "git@your-git-host:team/uni-pay.git",
    "branches": {
      "main": "main",
      "dev": "dev",
      "alpha": "alpha"
    }
  }
]

说明:

  • name 用作本地缓存目录名,必须唯一。
  • repo 是插件项目仓库地址。
  • branches 可选,用于少数分支名不一致的项目;未配置时默认使用当前仓库分支名。
  • 当前仓库如果在 master 分支,构建脚本会自动映射到插件项目的 main 分支。
  • 如果未配置 UNI_MODULE_PROJECTS_CACHE_DIR,脚本会使用项目根目录下的 .uni-module-projects-cache 作为默认缓存目录;该目录已加入 .gitignore

构建时脚本会对 uni-module-projects.json 中的每个项目执行以下流程:

  • 首次构建时自动 git clone
  • 后续构建时自动 git fetch --all --prune
  • 切换到当前仓库对应分支
  • 执行 git pull --ff-only
  • 从各项目的 uni_modules/ 中收集插件并参与 dts 构建

如果某个缓存仓库存在未提交改动,构建会直接失败,避免覆盖本地工作区。

如果多个来源中存在相同的 uni_modules/<plugin>/utssdk/interface.* 相对路径,构建会直接报错,避免生成结果互相覆盖。

构建

构建框架内置 Uni Api:

pnpm build:types:core

构建插件 API:

pnpm build:types:plugin:api

构建插件组件类型与 vuedoc:

pnpm build:types:plugin:component

构建业务插件类型:

pnpm build:types:plugin:biz

生成默认参数数据到编译器:

pnpm build:types:meta