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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mp-ci

v1.2.1

Published

微信小程序、小游戏CI工具。

Downloads

46

Readme

微信小程序(游戏)发布助手(mp-ci)

version downloads

PRs Welcome

Watch on GitHub Star on GitHub

微信小程序(游戏)发布助手, 支持预览和上传。可以和JenkinsGitHub Actions结合使用,实现自动化发布。

基于官方miniprogram-ci封装。

功能特性

  • 无需扫码登录
  • 自动读取appidsetting
  • 提交信息智能生成
  • 美化执行结果显示

Installation

// 全局安装
npm install -g mp-ci

// 本地安装
npm install --save-dev mp-ci

使用前需要使用小程序管理员身份访问"微信公众平台-开发-开发设置"后下载代码上传密钥,并配置 IP 白名单,才能进行上传、预览操作。

注意事项

  • 代码上传密钥拥有预览、上传代码的权限
  • 代码上传密钥不会明文存储在微信公众平台上,一旦遗失必须重置,请妥善保管
  • 未配置IP白名单的,将无法使用 mp-ci 进行预览和上传
  • 可选择不对IP进行限制,但务必明白风险

Usage

Usage: mp-ci [--options ...]

Options:
  -V, --version                  output the version number
  -h, --help                     display help for command

Commands:
  upload [options] [workspace]   上传代码
  preview [options] [workspace]  预览代码
  help [command]                 display help for command

Commands里面的workspace代表项目目录,默认使用命令执行目录,同时会检查project.config.json文件是否存在,并读取appidsetting设置。

命令返回的结果值如下:

  • 0: 成功
  • 1: 失败

upload

Usage: mp-ci upload [options] [workspace]

上传代码

Options:
  --env [value]     环境 (default: "dev")
  --type [value]    项目类型 (default: "miniProgram")
  --ver [value]     发布版本号
  --desc [value]    发布简介
  --pkp [value]     私钥文件所在路径
  --proxy [value]   代理url
  --robot [value]   指定CI机器人,1 ~ 30 (default: "1")
  -h, --help        display help for command

preview

Usage: mp-ci preview [options] [workspace]

预览代码

Options:
  --env [value]          环境 (default: "dev")
  --type [value]         项目类型 (default: "miniProgram")
  --ver [value]          发布版本号
  --desc [value]         发布简介
  --pkp [value]          私钥文件所在路径
  --qr [value]           二维码文件的格式: terminal|base64|image (default: "image")
  --qrDest [value]       二维码文件保存路径  (default: "preview.png")
  --pagePath [value]     预览页面路径
  --searchQuery [value]  预览页面路径启动参数,这里的&字符在命令行中应写成转义字符\&
  --proxy [value]        代理url
  --robot [value]        指定CI机器人,1 ~ 30 (default: "1")
  -h, --help             display help for command

说明:

version & desc

  • version版本号规则
    • 尝试读取目录下的 package.json 文件中version
    • 例如: 1.0.0
  • desc备注规则
    • 读取命令行中传入的环境参数: --env
    • 读取命令行中传入的备注参数: --desc
    • 获取项目(git)最新commitmessage
    • 组合: env: ${env} ${desc || message(hash)}
    • 例如: env: dev 补充信息(e0c015a)

pkp

私钥文件位置。

小程序管理员身份访问"微信公众平台-开发-开发设置"后下载密钥。

qr

可选值包括 terminal, base64, image

qrDest

qr设置为base64image时,需要设置qrDest指定输出位置(相对于项项目目录)。

searchQuery

预览页面启动参数。

这里的&字符在命令行中应写成转义字符\&

相关资源

  • mp-ci-demoTaroGitHub Actions持续集成示例