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

@mas.io/adc-miniu-cli

v1.4.0

Published

mini app build scripts

Readme

@alipay/adc-miniu-cli

mini app build scripts.

dev

package.json 中添加 dev scripts.

{
  "scripts": {
    "dev": "adc-mini-cli dev"
  }
}

build

package.json 中添加 build scripts.

{
  "scripts": {
    "build": "adc-mini-cli build"
  }
}

其它命令

  • copy-deps, 同 postinstall, 复制 npm dependencies 到构建输出目录,可用于小程序开发者工具单独打开构建输出目录。

  • pack, 打包构建输出目录为压缩文件,默认读取 package.jsonname 作为压缩文件名输出到项目根目录。

  • remax, 透传 remax 命令和选项

env

环境模式主要用于读取配置文件,参考项目中 configplugin/config 目录中的配置文件.
添加命令行选项 --env 指定环境模式, 目前支持四种环境模式: dev, test, pre, prod, 分别对应开发、测试、预发、生产四种环境, 读取对应环境配置文件.

{
  "scripts": {
    "dev": "adc-mini-cli build --env test"
  }
}

project.config.js

在项目根目录下新建配置文件 project.config.js,具体配置项可参考 lib/types 中的 Config 类型申明,项目配置扩展自 @alipay/adc-mini-cli-common 添加了自定义选项,访问 @alipay/adc-mini-cli-common 查看公共配置。

使用 @alipay/adc-miniu-cli 导出的辅助函数 defineConfig 定义项目配置可以获取 IDE 智能提示。

配置文件目前不支持 esm 模块格式,后期会考虑 esm 和 ts 格式配置文件。

project.config.js

const { defineConfig } = require('@alipay/adc-miniu-cli');

module.exports = defineConfig({
  // 公共配置
  /**
   * 项目根路径, 绝对路径格式, 默认 `process.cwd()`.
   */
  projectRoot: __dirname;
  /**
   * 构建输出目录, 一般不用设置, 默认读取 `mini.project.json` `miniprogramRoot` 或者 `pluginRoot`, 如果两者都存在则解析其其父目录,
   * 如果都不存在则默认 `dist`, 相对于项目根目录解析为绝对路径目录格式, 不包含目录尾部斜线。
   */
  outputDir: path.join(__dirname, 'dist');
  /**
   * `copy-node-modules` 没处理本地文件依赖形式 npm 包,配置需要手动复制的本地依赖包,格式为 npm 包名数组。
   * 注意:如果本地依赖包有依赖,需要手动配置本地包所依赖的包。
   */
  localPkgs: [
    '@alipay/mas-skeleton',
    '@ali/falcon-core'
  ],

  // 以下是扩展配置
  // ...
});

project.config.local.js

project.config.local.js 为本地配置文件,可覆盖 project.config.js 对应配置,一般会将本地配置文件加入 git 忽略。

project.config.local.js

const { defineConfig } = require('@alipay/adc-miniu-cli');

module.exports = defineConfig({
  /**
   * 如果配置了 `localPkgs` 则覆盖原配置,即为空数组。
   */
  localPkgs: []
});

查看文档 @alipay/adc-miniu-cli 了解更多。

变更日志

查看变更日志了解更多。

参考链接