Skip to content

Commit

Permalink
docs: 增加多端同步调试
Browse files Browse the repository at this point in the history
  • Loading branch information
honlyHuang committed Aug 28, 2019
1 parent 58f8038 commit 82b7149
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
16 changes: 16 additions & 0 deletions docs/envs-debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: 多端同步调试
---

从 1.3.5 版本开始,可以在 dist 目录下创建一个与编译的目标平台名同名的目录,并将结果放在这个目录下,例如编译到微信小程序,最终结果是在 dist/weapp 目录下,这样做的好处是,各个平台使用独立的目录互不影响,从而达到多端同步调试的目的,在 `config/index.js` 配置如下:
```
outputRoot: `dist/${process.env.TARO_ENV}`
```

多端同步调试需要在终端工具中打开多个 Tab 来同时执行 taro 命令进行同步调试,如下图,编译成微信小程序和支付宝小程序:

![打开多个 Tab 来同时执行 taro 命令进行同步调试](https://img30.360buyimg.com/ling/jfs/t1/62633/10/8451/595888/5d663badE57d35fd2/5a34822774836ede.png)

编译出来的目录如下图,`dist` 目录下有 `weapp``alipay` 两个目录:

![同步调试编译结果](https://img20.360buyimg.com/ling/jfs/t1/74046/26/8491/148076/5d663baaEf2ed8064/33fbb1d365053d1c.png)
8 changes: 5 additions & 3 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,9 @@
"debug": {
"title": "Debug 指南"
},
"envs-debug": {
"title": "多端同步调试"
},
"envs": {
"title": "跨平台开发"
},
Expand Down Expand Up @@ -2091,11 +2094,10 @@
"文档": "文档",
"组件库": "组件库",
"API": "API",
"GitHub": "GitHub",
"|": "|",
"Taro-UI": "Taro-UI",
"物料市场": "物料市场",
"论坛": "论坛"
"论坛": "论坛",
"GitHub": "GitHub"
},
"categories": {
"关于Taro": "关于Taro",
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"type": "subcategory",
"ids": [
"envs",
"envs-debug",
"relations",
"wxcloud",
"miniprogram-plugin",
Expand Down

0 comments on commit 82b7149

Please sign in to comment.