{"id":18855488,"url":"https://github.com/springhgui/compile2ant","last_synced_at":"2026-02-05T23:30:20.395Z","repository":{"id":57204692,"uuid":"215766893","full_name":"SpringHgui/compile2ant","owner":"SpringHgui","description":"wepy2.0.x 编译为支付宝小程序代码插件","archived":false,"fork":false,"pushed_at":"2022-03-29T08:38:32.000Z","size":67,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T23:05:23.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/compile2ant","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/SpringHgui.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-10-17T10:35:04.000Z","updated_at":"2021-11-30T13:54:25.000Z","dependencies_parsed_at":"2022-09-18T00:42:02.105Z","dependency_job_id":null,"html_url":"https://github.com/SpringHgui/compile2ant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringHgui%2Fcompile2ant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringHgui%2Fcompile2ant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringHgui%2Fcompile2ant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringHgui%2Fcompile2ant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpringHgui","download_url":"https://codeload.github.com/SpringHgui/compile2ant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793063,"owners_count":19697893,"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-11-08T03:54:04.639Z","updated_at":"2026-02-05T23:30:20.339Z","avatar_url":"https://github.com/SpringHgui.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compile2ant\n[![npm](https://img.shields.io/npm/v/compile2ant)](https://www.npmjs.com/package/compile2ant)\n![NPM](https://img.shields.io/npm/l/compile2ant)\n[![npm](https://img.shields.io/npm/dy/compile2ant)](https://www.npmjs.com/package/compile2ant)\n\nwepy2.0.x 编译为支付宝小程序代码插件\n\n### 安装\n\n测试未覆盖支付宝小程序的所有api  \n如编译后不能正常运行，请提交 issue 或直接 pr，会及时进行兼容\n\n```\nnpm install compile2ant --save-dev\n```\n\n### 配置\n\n`wepy.config.js`\n```\nconst antPlugin = require('compile2ant');\n\nmodule.exports = {\n  ...\n  plugins: [\n    antPlugin()\n  ],\n  ...\n}\n\n```\n\n### 编译\n\n直接执行以下命令\n```\n./node_modules/.bin/wepy build -o ant -t ant --watch\n```\n或在 `package.json`添加`scripts`如下, 可执行 `npm run ant` 进行编译\n```\n{\n  \"name\": \"xxx\",\n  \"version\": \"0.0.2\",\n  \"description\": \"A WePY project\",\n  \"main\": \"weapp/app.js\",\n  \"scripts\": {\n    ...\n    \"ant\": \"./node_modules/.bin/wepy build -o ant -t ant --watch\",\n    ...\n  },\n  ...\n }\n```\n### 重要的事情\n\n如果编译后运行报下面的错误，直接注释vendor.js对应的代码\n```\nTypeError: Function(...) is not a function\n```\n\n支付宝小程序 `启用 component2 编译` 一定要开启; `启用基础库2.0` 关闭  \n支付宝小程序 `启用 component2 编译` 一定要开启; `启用基础库2.0` 关闭  \n支付宝小程序 `启用 component2 编译` 一定要开启; `启用基础库2.0` 关闭  \n### MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringhgui%2Fcompile2ant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringhgui%2Fcompile2ant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringhgui%2Fcompile2ant/lists"}