{"id":35400297,"url":"https://github.com/lixl39505/weapp-gulp-service","last_synced_at":"2026-01-02T11:02:16.693Z","repository":{"id":57397211,"uuid":"385122736","full_name":"lixl39505/weapp-gulp-service","owner":"lixl39505","description":"weapp precompile workflow","archived":false,"fork":false,"pushed_at":"2025-11-05T03:56:21.000Z","size":519,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-10T02:55:24.978Z","etag":null,"topics":["cli","compiler","gulp4","miniprogram"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lixl39505.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2021-07-12T04:18:41.000Z","updated_at":"2025-11-05T03:56:24.000Z","dependencies_parsed_at":"2024-02-05T09:50:07.961Z","dependency_job_id":"99c465a3-468f-4ebd-a690-ca375bf089ca","html_url":"https://github.com/lixl39505/weapp-gulp-service","commit_stats":null,"previous_names":["lixl39505/weapp-gulp-service","pixelslee/weapp-gulp-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lixl39505/weapp-gulp-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixl39505%2Fweapp-gulp-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixl39505%2Fweapp-gulp-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixl39505%2Fweapp-gulp-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixl39505%2Fweapp-gulp-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lixl39505","download_url":"https://codeload.github.com/lixl39505/weapp-gulp-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lixl39505%2Fweapp-gulp-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28172204,"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","status":"online","status_checked_at":"2026-01-02T02:00:06.235Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","compiler","gulp4","miniprogram"],"created_at":"2026-01-02T11:02:05.453Z","updated_at":"2026-01-02T11:02:16.682Z","avatar_url":"https://github.com/lixl39505.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 简介\n\nweapp-gulp-service 是一款基于 gulp 实现的微信小程序预编译开发工具，可以有效提升原生小程序的开发效率。主要功能如下所示：\n\n语法增强：\n\n1. 支持 less；\n2. 支持 px 自动转 rpx；\n3. 支持本地图片转 base64；\n4. 支持路径别名 alias；\n5. 支持设置环境变量（类似 vue-cli 的 .env 文件）；\n6. 支持 json5 语法；\n7. 扩展 app.json，支持表达力更好的路由写法；\n8. 支持.vue 单文件开发（兼容大部分 v-指令）；\n\n工具特性：\n\n1. 0 配置使用；\n1. 支持增量编译；\n1. 支持自定义 task；\n1. 支持插件扩展（类似 Vue.use）；\n1. 支持自动构建 npm（需开启 wxDevtool cli 服务）；\n1. 支持命令行上传代码（需集成 `miniprogram-ci`）；\n\n## 安装/运行\n\n全局安装并使用：\n\n```bash\nnpm i weapp-gulp-service -g\n# 项目根目录执行\nwgs --config /user/workspace/xx/weapp.config.js\n```\n\n也可以局部安装并使用：\n\n```bash\nnpm i weapp-gulp-service -D\n# 项目根目录执行\nnpx wgs\n```\n\n项目 Demo 参见 [weapp-project](https://github.com/pixelsLee/weapp-gulp-service/tree/main/templates/weapp-project) （可直接作为开发模版）。\n\n## 详细说明\n\n见 [docs](./docs/md) 目录。\n\n## Command API\n\n开发模式：\n\n```bash\n# 编译 + watch\nwgs [options]\n# 或者\nwgs serve [options]\n```\n\n打包模式：\n\n```bash\n# 仅编译\nwgs build [options]\n```\n\n构建 npm\n\n```bash\n# 生成 miniprogram_npm 目录\nwgs build:npm [options]\n```\n\n代码上传:\n\n```bash\n# 先编译再上传\nwgs upload -v 1.0.1 [desc]\n```\n\nps: 各命令选项可通过 `--help` 查看\n\n### 小程序 ci/cli 集成说明\n\n_自动构建 npm_ 与*上传代码*两个功能前置依赖小程序官方服务——[wxdevtool-cli](https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html) 或者 [miniprogram-ci](https://developers.weixin.qq.com/miniprogram/dev/devtools/ci.html)。\n\n如果使用 wxdevtool-cli（以下简称 cli 模式），需设置环境变量：\n\n```bash\n# macOS\nWX_CLI=\u003c安装路径\u003e/Contents/MacOS/cli\n# Windows\nWX_CLI=\u003c安装路径\u003e/cli.bat\n```\n\n如果使用 miniprogram-ci（以下简称 ci 模式），需设置环境变量：\n\n```bash\nWE_APP_PRIVATE_KEY_PATH=\u003c私匙路径\u003e/private.xxxx.key\n```\n\n并安装全局依赖 miniprogram-ci；\n\n```bash\nnpm i miniprogram-ci -g\n```\n\n两种方式二选一即可。如果二者同时设置，则 ci 模式优先。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixl39505%2Fweapp-gulp-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flixl39505%2Fweapp-gulp-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flixl39505%2Fweapp-gulp-service/lists"}