{"id":17685490,"url":"https://github.com/ineo6/mini-deploy","last_synced_at":"2025-07-09T17:06:02.262Z","repository":{"id":57195141,"uuid":"167920525","full_name":"ineo6/mini-deploy","owner":"ineo6","description":"微信小程序发布助手 mini program","archived":false,"fork":false,"pushed_at":"2020-06-04T01:44:06.000Z","size":134,"stargazers_count":30,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T14:03:20.760Z","etag":null,"topics":["deploy","jenkins","miniprogram","wechat"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ineo6.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-28T07:47:38.000Z","updated_at":"2023-01-12T02:40:02.000Z","dependencies_parsed_at":"2022-09-16T05:21:03.301Z","dependency_job_id":null,"html_url":"https://github.com/ineo6/mini-deploy","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ineo6/mini-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmini-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmini-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmini-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmini-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ineo6","download_url":"https://codeload.github.com/ineo6/mini-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fmini-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264497801,"owners_count":23618016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deploy","jenkins","miniprogram","wechat"],"created_at":"2024-10-24T10:27:56.946Z","updated_at":"2025-07-09T17:06:02.003Z","avatar_url":"https://github.com/ineo6.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 微信小程序发布助手（mini-deploy）\n\n[![version][version-badge]][package]\n[![downloads][downloads-badge]][npm-stat]\n\n[![PRs Welcome][prs-badge]][prs]\n\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n\n**推荐大家使用全新的发布助手 [mp-ci](https://github.com/ineo6/mp-ci)，无需登录，体验真正的一键发布。**\n\n微信小程序发布助手, 支持预览和上传。可以和`jenkins`结合使用，实现微信小程序自动化发布。\n\n## 功能特性\n\n- 支持重新登录机制\n- 覆盖大部分微信小程序命令行功能\n\n## Installation\n\n因为`api`调整的原因，安装前请根据微信开发者工具的版本号选择正确的`mini-deploy`版本。\n\n| 版本 | 微信开发者工具 |\n| --- | --- |\n| 2.x | 1.02.2004020 及以上  |\n| 1.x | 1.02.2004020 以下  |\n\n```shell\n// 全局安装\nnpm install -g mini-deploy\n\n// 本地安装\nnpm install --save-dev mini-deploy\n```\n\n## Usage\n\n```sh\nUsage: mini-deploy [--options ...]\n\nOptions:\n  -V, --version                       output the version number\n  -w, --workspace [value]             微信小程序工作区目录 (default: \"/Users/neo/WorkSpace/deploy-mini\")\n  -ver, --ver [value]                 发布版本号 (default: \"1.0.0\")\n  -d, --desc [value]                  发布简介 (default: \"2019年08月19日13点07分21秒提交上传\")\n  -m, --mode [value]                  模式: preview|upload (default: \"preview\")\n  --resume                            启用任务续传 (default: true)\n  --no-resume                         禁用任务续传\n  --upload.log [value]                上传日志路径\n  --preview.format [value]            二维码输出形式：terminal|base64|image (default: \"image\")\n  --preview.qr [value]                二维码存放路径 (default: \"preview.png\")\n  --preview.log [value]               预览日志路径\n  --preview.compileCondition [value]  自定义编译条件\n  --login.format [value]              二维码输出形式：terminal|base64|image (default: \"terminal\")\n  --login.qr [value]                  二维码存放路径\n  --login.log [value]                 登录日志路径\n  -d, --debug                         debug mode\n  -h, --help                          output usage information\n```\n\n执行命令后返回结果值:\n\n- 0: 成功\n- 1: 失败\n- 2：需要重新登录\n\n#### `mode`\n\n预览（`preview`）或者上传（`upload`）。\n\n\u003e preview 预览时会在`workspace`目录下生成二维码`preview.png`，在`jenkins`中可以读取图片在`job`结果中显示，大家可以自行扩展。\n\n#### `workspace`\n\n小程序项目地址，默认会取命令执行目录，同时会检查`project.config.json`是否存在。\n\n#### `ver`\n\n上传版本号，默认为`1.0.0`\n\n#### `desc`\n\n上传描述, 默认为'xxxx年x月x日 x点x分x秒 提交上传'\n\n#### `resume`\n\n启用任务续传后，上传或者预览过程中完成重新登录后会继续执行之前的任务。\n\n#### `no-resume`\n\n禁用任务续传后，重新登录之后需要再次手动执行任务。\n\n### `upload.log`\n\n指定后，会将本次上传的额外信息以 json 格式输出至指定路径，如代码包大小、分包大小信息。\n\n需要注意的是日志文件需要提前创建。\n\n### `preview.format`\n\n预览二维码的格式，format 可选值包括 terminal（命令行输出）, base64, image。\n\n### `preview.qr`\n\n二维码输出位置，相对于项目。\n\n### `preview.log`\n\n定后，会将本次预览的额外信息以 json 格式输出至指定路径，如代码包大小、分包大小信息。\n\n### `preview.compileCondition`\n\n指定自定义编译条件，json 条件可指定两个字段，pathName 表示打开的页面，不填表示首页，query 表示页面参数。\n\n示例如下：\n\n```json\n{\"pathName\":\"pages/index/index\",\"query\":\"x=1\u0026y=2\"}\n```\n\n### `login.format`\n\n同`preview.format`\n\n默认为`terminal`，会把二维码输出到流中，在`jenkins`中通过查看控制台输出，可以直接扫描登录。\n\n如果有其他需求，可以自定义输出到文件。\n\n### `login.qr`\n\n同 `preview.qr`\n\n### `login.log`\n\n输出登录结果到指定文件\n\n\n## 文档\n\n- [配套jenkins示例](http://idayer.com/wechat-mimi-program-build-with-jenkins/)\n\n## 扩展\n\n- [每日优鲜便利购微信小程序集成 Jenkins 生成二维码发版](https://testerhome.com/topics/14913#reply-115145)\n- [微信小程序集成 Jenkins](https://segmentfault.com/a/1190000016247970)\n\n## 更新日志\n\n[changelog](./changelog.md)\n\n[dependencyci]: https://dependencyci.com/github/ineo6/mini-deploy\n[version-badge]: https://img.shields.io/npm/v/mini-deploy.svg?style=flat-square\n[package]: https://www.npmjs.com/package/mini-deploy\n[downloads-badge]: https://img.shields.io/npm/dm/mini-deploy.svg?style=flat-square\n[npm-stat]: http://npm-stat.com/charts.html?package=mini-deploy\u0026from=2018-10-31\n[license-badge]: https://img.shields.io/npm/l/mini-deploy.svg?style=flat-square\n[license]: https://github.com/ineo6/mini-deploy/blob/master/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[coc-badge]: htts://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[github-watch-badge]: https://img.shields.io/github/watchers/ineo6/mini-deploy.svg?style=social\n[github-watch]: https://github.com/ineo6/mini-deploy/watchers\n[github-star-badge]: https://img.shields.io/github/stars/ineo6/mini-deploy.svg?style=social\n[github-star]: https://github.com/ineo6/mini-deploy/stargazers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fmini-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fineo6%2Fmini-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fmini-deploy/lists"}