2.2.6 • Published 1 year ago

miniprogram-to-uniapp v2.2.6

Weekly downloads
54
License
Apache License 2....
Repository
github
Last release
1 year ago

转换各种小程序为 uni-app 项目 v2.0

支持转换微信、QQ、头条/抖音、支付宝/钉钉和百度等小程序转换到 uni-app 项目

输入小程序项目路径,即可输出 uni-app 项目。

工具同时支持 Npm 安装 和 HbuilderX 插件(不依赖环境) 两种形式安装,安装方式如下:

Npm 安装

$ npm install miniprogram-to-uniapp -g

使用方法

Usage: wtu [options]

Options:

  -V, --version          output the version number [版本信息]
  -i, --input <target>   the input path for weixin miniprogram project [输入目录]
  -h, --help             output usage information [帮助信息]
  -c, --cli              the type of output project is vue-cli, which default value is false [是否转换为vue-cli项目,默认false]
  -m, --merge            merge wxss file into vue file, which default value is false [是否合并wxss到vue文件,默认false]
  -t, --template         transform template and include to component, which default value is false [转换template和include为单独组件,默认false]

示例:

默认转换:
$ wtu -i "./miniprogram-project"

注:"./miniprogram-project" 是要转换的小程序项目目录,如路径中有空格应该用引号引起来。

将 wxss 合并入 vue 文件:
$ wtu -i "./miniprogram-project" -m
转换项目为 vue-cli 项目:
$ wtu -i "./miniprogram-project" -c
将 template 里面的 import/template 和 include 标签转换为单独组件(实验性):
$ wtu -i "./miniprogram-project" -t

待命令行运行结束,会在小程序项目的同级目录有以 小程序项目名 + "_uni" 或 小程序目录名 + "_uni-cli" 目录,即是转换好的 uni-app 项目,转换好后,请使用 HBuilderX 导入并运行。

HbuilderX 插件安装

请参考项目:【HBuilder X 插件】 转换各种小程序为 uni-app 项目 进行食用。

说明文档

关于本工具转换原理及常见问题,请见:miniprogram-to-uniapp文档

问题答疑

对于使用有疑问或建议,欢迎加入 QQ 群进行指导和交流。

交流 QQ 群:

1 群:780359397 (已满)

2 群:361784059 (已满)

3 群:603659851 (已满)

4 群:555691239

参考资料

  1. GoGoCode 工具主要转换逻辑依赖 GoGoCode 构建
  2. 工具使用mp-html替换 wxParse
  3. 工具使用全兼容官方 picker mode=region 城市选择器替换 <picker mode="region"></picker>
  4. [AST 实战]从零开始写一个 wepy 转 VUE 的工具
  5. https://astexplorer.net/ AST 可视化工具
  6. Babylon-AST 初探-代码生成(Create) 系列文章
  7. Babel 插件手册 中文版 Babel 插件手册
  8. Babel 官网 有问题直接阅读官方文档哈
  9. 微信小程序转换 uni-app 详细指南 补充了我一些未考虑到的规则。

最后

如果觉得帮助到你的话,可以支持一下作者,请作者喝杯咖啡哈~

这样会更有动力更新哈~~

非常感谢~~

微信支付 支付宝支付

LICENSE

This repo is released under the Apache License 2.0.

2.2.6

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.16

3 years ago

2.0.19

2 years ago

2.0.17

3 years ago

2.0.18

3 years ago

2.0.24

2 years ago

2.0.22

2 years ago

2.0.23

2 years ago

2.0.20

2 years ago

2.0.21

2 years ago

2.0.15

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.10

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.5

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.76

4 years ago

1.0.75

4 years ago

1.0.74

4 years ago

1.0.73

4 years ago

1.0.72

4 years ago

1.0.71

4 years ago

1.0.70

4 years ago

1.0.69

4 years ago

1.0.68

4 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.49

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.40

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago