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

@mario34/mp-ci

v1.2.2

Published

微信小程序ci

Downloads

7

Readme

小程序代码上传 ci

⏱ 小程序持续集成 ci,基于miniprogram-ci实现

快速配置

  • 安装开发依赖
yarn add @mario34/mp-ci -D
  • 添加发布脚本 mp-ci.mjs
import path from "path";
import run from "@mario34/mp-ci";
import packageJson from "./package.json";

run({
  config() {
    return {
      appid: "wxsomeappid",
      type: "miniProgram",
      projectPath: path.resolve(process.cwd(), "./dist/"),
      privateKeyPath: path.resolve(process.cwd(), "./dist/"),
      ignores: ["node_modules/**/*"],
    };
  },
  formatVersion() {
    return packageJson.version;
  },
  formatDesc(info) {
    // info包含了项目的部分信息,可以用来定制描述
    return packageJson.version;
  },
  setting() {
    return {
      es6: true,
      es7: true,
    };
  },
});
  • 添加脚本
{
  "scripts": {
    "ci": "node --experimental-modules --es-module-specifier-resolution=node ./mp-ci.mjs --log"
  }
}
  • 在微信公众平台添加相关配置

登录微信公众平台,前往 开发=>开发管理=>开发设置=>小程序代码上传,生成上传密钥,开启了上传白名单的话需要把 CI 物理机的 ip 加入到 ip 白名单

配置

项目信息

项目信息在配置为函数类型中作为参数暴露,类型如下

interface Info {
  git: {
    branch: string;
  };
}

config

返回项目配置对象的函数或配置对象

| 参数 | 描述 | 类型 | 默认值 | 必填 | | ----------- | ------------------------------------------------------------------------------- | -------- | --------------------- | ---- | | appid | 小程序 appid | string | / | 是 | | projectPath | 上传代码路径 | string | / | 是 | | type | 显示指明当前的项目类型 miniProgram、miniProgramPlugin、miniGame、miniGamePlugin | string | miniProgram | 否 | | ignores | 排除的规则 | string[] | ['node_modules/**/*'] | 否 | | keyType | 密钥类型 file/raw | string | file | 否 |

formatVersion

格式化版本号函数,返回版本号字符串,参数为暴露的项目信息

formatDesc

格式化描述信息函数,返回描述字符串,参数为暴露的项目信息

setting

上传设置

interface ICompileSettings {
  es6?: boolean;
  es7?: boolean;
  minify?: boolean;
  codeProtect?: boolean;
  minifyJS?: boolean;
  minifyWXML?: boolean;
  minifyWXSS?: boolean;
  autoPrefixWXSS?: boolean;
  disableUseStrict?: boolean;
}