1 Star 5 Fork 1

Gui.H / compile2ant

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

compile2ant

npm NPM npm

wepy2.0.x 编译为支付宝小程序代码插件

注意事项

插件仅支持 2.0.0-alpha.21之后的版本,请将cli先升级至最新版。

npm install @wepy/cli@next -g

安装

由于个人精力有限,测试未覆盖支付宝小程序的所有api
如编译后不能正常运行,请提交 issue 或直接 pr,会及时进行兼容

npm install compile2ant -save-dev

配置

wepy.config.js

const antPlugin = require('compile2ant');

module.exports = {
  ...
  plugins: [
    antPlugin()
  ],
  ...
}

编译

直接执行以下命令

./node_modules/.bin/wepy build -o ant -t ant --watch

或在 package.json添加scripts如下, 可执行 npm run ant 进行编译

{
  "name": "xxx",
  "version": "0.0.2",
  "description": "A WePY project",
  "main": "weapp/app.js",
  "scripts": {
    ...
    "ant": "./node_modules/.bin/wepy build -o ant -t ant --watch",
    ...
  },
  ...
 }

重要的事情

支付宝小程序 启用 component2 编译 一定要开启
支付宝小程序 启用 component2 编译 一定要开启
支付宝小程序 启用 component2 编译 一定要开启

注释编译后的vendor.js最后一行代码如下

// Function("r", "regeneratorRuntime = r")(runtime)

MIT

空文件

简介

wepy2.0.x 编译为支付宝小程序代码插件 展开 收起
JavaScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/SpringHgui/compile2ant.git
git@gitee.com:SpringHgui/compile2ant.git
SpringHgui
compile2ant
compile2ant
master

搜索帮助