{"id":22859438,"url":"https://github.com/qiuweikangdev/wx-tool-ci","last_synced_at":"2025-03-31T08:20:29.151Z","repository":{"id":65895842,"uuid":"581172345","full_name":"qiuweikangdev/wx-tool-ci","owner":"qiuweikangdev","description":"小程序上传 ci 工具","archived":false,"fork":false,"pushed_at":"2023-02-14T15:05:13.000Z","size":143,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T12:48:02.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qiuweikangdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-22T13:15:15.000Z","updated_at":"2022-12-27T14:10:59.000Z","dependencies_parsed_at":"2023-04-10T05:18:54.438Z","dependency_job_id":null,"html_url":"https://github.com/qiuweikangdev/wx-tool-ci","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiuweikangdev%2Fwx-tool-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiuweikangdev%2Fwx-tool-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiuweikangdev%2Fwx-tool-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiuweikangdev%2Fwx-tool-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiuweikangdev","download_url":"https://codeload.github.com/qiuweikangdev/wx-tool-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436340,"owners_count":20776995,"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":[],"created_at":"2024-12-13T09:06:59.587Z","updated_at":"2025-03-31T08:20:29.146Z","avatar_url":"https://github.com/qiuweikangdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 小程序 ci 自动化工具\n\n- 基于miniprogram-ci插件开发的小程序上传、预览自动化工具\n\n## 安装\n\n使用npm:\n\n```bash\nnpm i wx-tool-ci --save-dev\n```\n\n使用yarn:\n\n```bash\nyarn add wx-tool-ci -D\n```\n\n使用pnpm\n\n```bash\npnpm install wx-tool-ci -D\n```\n\n也可全局安装【推荐】\n\n```bash\nnpm install wx-tool-ci -g\n```\n\n\n\n## 使用\n\n### 初始化生成配置文件\n\n- 简写i\n\n```bash\nwx-tool init\n```\n\n### 上传\n\n- 简写u\n\n```bash\nwx-tool upload\n```\n\n### 预览\n\n- 简写p\n\n```bash\nwx-tool preview\n```\n\n\n\n## 配置说明\n\n具体配置详情：查看[miniprogram-ci](https://www.npmjs.com/package/miniprogram-ci)官方文档\n\n**ci.config.js配置**\n\n| 参数             | 描述                                                         | 类型   | 必传 | 默认值        |\n| ---------------- | ------------------------------------------------------------ | ------ | ---- | ------------- |\n| `appid`          | 小程序appid                                                  | string | 是   |               |\n| `type`           | 显示指明当前的项目类型                                       | string | 是   | `miniProgram` |\n| `projectPath`    | 小程序生成目录                                               | string | 是   | `dist`        |\n| `privateKeyPath` | 小程序钥匙目录【应访问\"微信公众平台-开发 - 开发设置\"后下载代码上传密钥】 | string | 否   |               |\n| `setting`        | 编译设置                                                     | object | 否   |               |\n| `version`        | 小程序版本号 【如果未指定,默认取当前项目中的package.json的version,version默认1.0.0】 | object | 否   |               |\n| `projectOptions` | 项目的自定义配置，和上面配置合并                             | object | 否   |               |\n| `uploadOptions`  | 上传的自定义配置                                             | object | 否   |               |\n| `previewOptions` | 预览自定义配置                                               | object | 否   |               |\n| `beforeCommand`  | 上传前执行脚本, 如上传之前进行打包 [{ command: 'pnpm build',desc: '打包'}] | array  | 否   |               |\n| `afterCommand`   | 上传之后执行脚本                                             | array  | 否   |               |\n\n默认配置表如下:\n\n```js\nexport default {\n\t// 小程序appid\n\tappid: '',\n\t// 显示指明当前的项目类型\n\ttype: 'miniProgram',\n\t//小程序生成目录\n\tprojectPath: 'dist',\n\t/**\n\t * 小程序钥匙目录\n\t * 使用 miniprogram-ci 前应访问\"微信公众平台-开发 - 开发设置\"后下载代码上传密钥\n\t */\n\tprivateKeyPath: '',\n\t// 编译设置\n\tsetting: {\n\t\tes6: true,\n\t\tes7: false,\n\t\t// 上传时压缩 JS 代码\n\t\tminifyJS: false,\n\t\t// 上传时压缩 WXML 代码\n\t\tminifyWXML: false,\n\t\t// 上传时压缩 WXSS 代码\n\t\tminifyWXSS: false,\n\t\t// 上传时压缩所有代码，对应于微信开发者工具的 \"上传时压缩代码\"\n\t\tminify: true,\n\t\t// 对应于微信开发者工具的 \"上传时进行代码保护\"\n\t\tcodeProtect: false,\n\t\t// 对应于微信开发者工具的 \"上传时样式自动补全\"\n\t\tautoPrefixWXSS: false,\n\t},\n\t// 小程序版本号, 如果未指定,默认取当前项目中的package.json的version,version默认1.0.0\n\tversion: '',\n\t// 项目的自定义配置，和上面配置合并\n\tprojectOptions: {},\n\t// 上传的自定义配置\n\tuploadOptions: {\n\t\tversion: '',\n\t\tdesc: '',\n\t\t// 编译设置\n\t\tsetting: {\n\t\t\tes6: true,\n\t\t},\n\t},\n\t// 预览自定义配置\n\tpreviewOptions: {\n\t\t// 预览二维码文件保存路径\n\t\tqrcodeOutputDest: '/preview/destination.jpg',\n\t},\n\t/**\n\t *  上传前执行脚本, 如上传之前进行打包\n\t *  [{ command: 'pnpm build',desc: '打包'}]\n\t */\n\tbeforeCommand: [],\n\t// 上传之后执行脚本\n\tafterCommand: [],\n};\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiuweikangdev%2Fwx-tool-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiuweikangdev%2Fwx-tool-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiuweikangdev%2Fwx-tool-ci/lists"}