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

duxapp-cli

v2.5.33

Published

duxapp CLI工具

Readme

duxapp项目创建工具

初始化duxapp项目,自动生成app图标,证书,修改包名等功能

使用

yarn add duxapp-cli

yarn 或者 npm run 运行下面的命令

或者不安装到项目,使用npx运行命令,将下面的所有 duxapp 命令替换为 npx duxapp-cli

项目配置

在项目根目录下创建可选的 duxapp.config.js 文件来自定义 CLI 行为,例如:

export default {
  install: {
    // `install.allModuleDependencies`
    // 将所有模块(包括未参与当前编译的模块)的 package.json 依赖写入根 package.json
    allModuleDependencies: true
  }
}

install.allModuleDependencies 设为 true 后,任意命令在生成运行时文件并执行依赖安装时,都会聚合 src 目录下所有模块的依赖项。这样在不同命令之间切换时无需重复安装慢速依赖;默认情况下仅安装当前入口模块及其依赖模块所需的包。

当该功能启用且存在未参与本次编译的模块时,CLI 会在 dist/react-native.config.js 生成一份 React Native 配置,将这些模块的原生依赖默认禁用(android: null / ios: null)。将需要保留的包从列表中移除即可重新启用,或把内容合并到项目根目录的 react-native.config.js 中。

支持的命令列表

create

初始化一个新的项目

duxapp create 项目名称

app

app add

添加、更新模块,支持批量添加 会同步更新所依赖的模块

duxapp app add <模块1> <模块2>
duxapp app add duxui

添加模块时会自动计算并保存模块的完整性校验信息到 dist/duxapp-apps-info.json 文件中。

示例 duxapp-apps-info.json 文件结构:

{
  "modules": {
    "duxui": {
      "checksum": "a1b2c3d4e5f6...",
      "version": "1.2.3",
      "installedAt": "2024-01-20T10:30:00Z",
      "files": {
        "index.js": "1234567890abcdef",
        "components/Button.jsx": "fedcba0987654321"
      }
    }
  }
}

app update

更新模块依赖,任意模块都可以,会检查当前模块所依赖的模块是否在应用商店发布

如果不传入任何参数,会更新所有可更新的模块

duxapp app update <模块1> <模块2>
duxapp app update

app publish

发布模块

duxapp app add 模块名称

发布模块 并且发布依赖的模块

duxapp app add 模块名称 1

app check

创建一个模块

duxapp app create 模块名称 模块描述

app create

创建一个模块

duxapp app create 模块名称 模块描述

app checkIntegrity

检查从应用商店安装的模块是否被修改过

# 检查特定模块
yarn duxapp app checkIntegrity duxui

# 检查所有已安装模块
yarn duxapp app checkIntegrity

此命令会验证模块文件是否被修改,并显示具体哪些文件发生了变化。

npm

用于管理模块的npm依赖相关的命令

npm add

给模块添加依赖,添加依赖规则将会以 ~ 的形式添加进去

# 给 duxui 模块添加 dayjs 插件
duxapp npm add dayjs --app duxui
# 指定版本号添加
duxapp npm add [email protected] --app duxui
# 一次性添加多个依赖
duxapp npm add [email protected] duxapp-cli --app duxui

project

project clearStatic

清理项目没用到的静态资源文件

duxapp project clearStatic

rn react-native端操作

rn create

创建RN打包环境

# 需要同时指定模块和配置才能创建成功
duxapp rn appIcon --app=模块 --config=配置名称

rn logo

通过图标工厂接口快速创建项目app图标

# 未指定图标,请将图标命名为 logo.png 放在配置目录下
duxapp rn logo --config=配置名称
# 或者指定图标位置 相对于配置目录
duxapp rn logo logo.png --config=配置名称

android

android keystore

未项目配置生成证书

duxapp android keystore --config=项目配置

ios

ios upload

将ios的ipa安装包上传到应用商店

duxapp ios upload aaa.ipa

要使用这个功能需要在配置文件提供账号和密码

{
  ios: {
    // 应用商店上传账号
    account: '',
    // 不是账号密码,是在账户中心生成的密码
    password: ''
  }
}

file

file move

将一个文件移动到另一个位置,或者是文件夹

duxapp file move a b

file copy

将一个文件复制到另一个位置,或者是文件夹

duxapp file copy a b

file delete

删除文件或文件夹

duxapp file delete a