Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transformer-wx)增加TARO-UI侧的快应用转换支持,不支持部分组件默认支持为DIV,支持部分默认为原生组件名 #5153

Open
wants to merge 175 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
5c4680a
chore: changelog && docs
luckyadam Dec 11, 2019
7dcb026
chore(deps): bump postcss-modules-values from 1.3.0 to 3.0.0 (#3639)
dependabot-preview[bot] Dec 11, 2019
d30063c
chore(deps): bump postcss-modules-local-by-default from 1.2.0 to 3.0.…
dependabot-preview[bot] Dec 11, 2019
57b6d3c
chore(deps): bump inquirer from 5.2.0 to 7.0.0 (#4401)
dependabot-preview[bot] Dec 11, 2019
58e0c17
chore(deps-dev): bump @types/react-dom from 16.8.4 to 16.9.4 (#5068)
dependabot-preview[bot] Dec 12, 2019
61d7afe
feat(weapp): add missing type for image component (#5071)
Dec 12, 2019
30da28f
fix: video component
ZakaryCode Dec 12, 2019
b7f8b9a
feat: add style for video
ZakaryCode Dec 12, 2019
e3fcfa5
fix(components): 修复 Image 组件在 react 环境下报错的问题
luckyadam Dec 12, 2019
b4ac71a
fix(components): h5 image 删除无关代码 (#4998)
Lostsory Dec 13, 2019
67f7d7c
feat: checkout from auto-docs
ZakaryCode Dec 15, 2019
2cb9e47
chore: 暂时只有 2.x 分支 ci 时会重新构建文档
luckyadam Dec 16, 2019
f359155
feat(cli): 尝试接入 webpack 来编译各端小程序
luckyadam May 13, 2019
1e0df82
feat(cli): 拆分逻辑到 loader
luckyadam May 15, 2019
50d93b8
feat(cli): 将 app/页面/组件 添加到入口文件进行编译
luckyadam May 23, 2019
ffa9329
refactor(transformer): 任何情况返回都返回相同的 result
yuche May 28, 2019
6de60e3
fix(transformer): 修复测试用例
yuche May 28, 2019
34c95f5
refactor(transformer): isApp 不再是必填参数
yuche May 28, 2019
289b80e
fix(transformer): 支持直接 import default
yuche May 28, 2019
c0e6b75
fix(cli): 编译器参数调整
luckyadam May 28, 2019
9a7ef23
fix(cli): lerna 加入 taro-mini-runner && 接入 webpack 生成小程序文件
luckyadam May 28, 2019
06178c4
refactor(transformer): isNormal 变为可选参数
yuche May 29, 2019
096cef5
fix(cli): 普通文件经过编译器编译必须传入 isNormal
luckyadam May 29, 2019
bc74a7b
feat(cli): 调整文件编译
luckyadam May 29, 2019
836da30
feat(taro-mini-runner): 拆分文件编译成为 plugin
luckyadam Jun 4, 2019
8bcc79a
feat(taro-mini-runner): 引入拆分的公共 chunks
luckyadam Jun 4, 2019
f4f6dbd
feat(taro-mini-runner): 生成页面以及组件的 usingComponents 配置
luckyadam Jun 4, 2019
faf96dd
feat(taro-mini-runner): 生成多端类型文件
luckyadam Jun 5, 2019
75ac23e
feat(taro-mini-runner): 优化文件生成
luckyadam Jun 5, 2019
7d6c522
feat(taro-mini-runner): 如果是组件需要补充 component:true 配置
luckyadam Jun 5, 2019
050c64f
fix(cli): 支持引用 node_modules 中组件
luckyadam Jun 14, 2019
90449ea
feat(mini-runner): 增加 Taro 模块专有处理插件
luckyadam Jun 17, 2019
bf4749e
feat(cli): 增加 tapable 包
luckyadam Jun 17, 2019
24141a7
fix(cli): 修复代码合并的问题
luckyadam Jun 17, 2019
ce5e24d
fix(transformer): 修复错误类型
yuche Jun 17, 2019
e6d2abc
feat(cli): 借助 tapable 改造
luckyadam Jun 17, 2019
7160c82
feat(cli): cli 支持事件 && 小程序编译配置向 H5 看齐
luckyadam Jun 19, 2019
8715d74
fix(cli): 修复目录创建
luckyadam Jun 24, 2019
eb2511a
feat(taro): 调整小程序和 H5 的编译配置
luckyadam Jun 25, 2019
eaa56da
feat(taro-cli): 调整 rn 编译配置
luckyadam Jun 25, 2019
e4b3581
feat(mini-runner): 支持分包
luckyadam Jun 26, 2019
d275b83
fix(mini-runner): npm 中文件不会经过 taro 包替换操作
luckyadam Jun 26, 2019
868f51d
feat(mini-runner): 支持编译 tabBar 上引用的资源编译
luckyadam Jun 26, 2019
e686427
feat(mini-runner): 支持与原生小程序代码混写
luckyadam Jun 26, 2019
2c39d37
fix(mini-runner): 只有 taro 的包不能经过依赖包名替换
luckyadam Jul 4, 2019
8c7a4c2
fix(mini-runner): 修复引用 npm 中组件间存在依赖时依赖路径解析错误的问题
luckyadam Jul 10, 2019
77a7dd2
fix(mini-runner): 打包优化,引用自 npm 包中的组件不抽离至 vendors 中
luckyadam Jul 10, 2019
5669de2
chore: merge master
luckyadam Aug 20, 2019
4090074
fix(taro): 小程序 webpack 编译静态文件路径
luckyadam Aug 26, 2019
9fc682a
fix(mini-runner): 优化 webpack 编译时样式处理
luckyadam Aug 26, 2019
5fd120d
feat(mini-runner): 加入 watch
luckyadam Aug 27, 2019
6e0877a
fix(cli): 修复 watch 时文件修改不对的问题
luckyadam Sep 3, 2019
c27ee31
chore: merge master
luckyadam Sep 4, 2019
d8d8b9a
feat(taro): 加入快应用编译支持
luckyadam Sep 5, 2019
6b3c3b9
fix(mini-runner): 提前解析快应用页面
luckyadam Sep 8, 2019
80717d3
feat(mini-runner): 生成快应用页面及组件
luckyadam Sep 9, 2019
5cdb52b
feat(mini-runner): 保证快应用文件生成正确
luckyadam Sep 16, 2019
0c14d71
feat(mini-runner): 优化 watch
luckyadam Sep 16, 2019
14cac97
fix(mini-runner): 修复 watch bug
luckyadam Sep 18, 2019
c5e07fc
chore: merge
luckyadam Sep 18, 2019
c83f024
fix(jd): 修复合并代码导致的京东小程序的编译问题
luckyadam Sep 18, 2019
a35a00f
chore: 修复语法报错问题
luckyadam Sep 18, 2019
af38381
fix(mini-runner): 修复普通小程序编译的问题
luckyadam Sep 23, 2019
fb60f37
fix(webpack): 修复文件压缩的问题
luckyadam Sep 24, 2019
9f3e97e
feat(taro): cli 配合 mini-runner 重构 && 支持使用 mini-runner 编译插件
luckyadam Oct 8, 2019
4930f1a
fix(mini-runner): 修复小程序编译报错
luckyadam Oct 15, 2019
1f7b4a5
fix(mini-runner): 支持快应用编译后模板与样式的检测
luckyadam Oct 15, 2019
03d5f82
fix(mini-runner): 修复对 css modules 的支持
luckyadam Oct 15, 2019
79b22f0
fix: pxtransform disable on quick-app
ZakaryCode Oct 17, 2019
3a5524a
fix(cli): 修复 doctor 对 config 的检测
luckyadam Oct 17, 2019
e5dc888
fix(cli): 清理代码
luckyadam Oct 17, 2019
818c338
fix(mini-runner): 加上文件编译提示
luckyadam Oct 22, 2019
366e12f
fix(cli): 修复配置文件中读取不到 process.env.TARO_ENV 的问题
luckyadam Oct 22, 2019
6a8ec4b
fix(taro-quickapp): 修复快应用事件绑定异常问题
luckyadam Oct 22, 2019
5f395b7
fix: position linter for quickapp 1060+
ZakaryCode Oct 22, 2019
55d5cd0
chore(taro): 规范类型定义文件命名
Garfield550 Oct 22, 2019
3052823
fix(mini-runner): 修复快应用编译后页面标题展示不正确的问题
luckyadam Oct 22, 2019
9603d22
fix(taro): 修复快应用下拉刷新问题
luckyadam Oct 22, 2019
599d399
fix(cli): 更新默认模板
luckyadam Oct 23, 2019
6a44bb3
fix(mini-runner): 修复 builder 的 hooks 调用
luckyadam Oct 23, 2019
916bee3
docs: 更新新的配置文档
luckyadam Oct 23, 2019
0eec693
fix(mini-runner): 修复 tabbar 编译及组件 watch 的问题
luckyadam Oct 24, 2019
32ff140
feat: audio context
ZakaryCode Oct 24, 2019
6800be7
feat: mock for quickapp
ZakaryCode Oct 27, 2019
190785e
fix: quickapp api upload from docs
ZakaryCode Oct 28, 2019
5b44e9e
chore: merge master
luckyadam Oct 28, 2019
2020c19
fix(mini-runner): 修复快应用打包报错的问题
luckyadam Oct 28, 2019
069dc1e
fix(components-qa): 修复页面 onReachBottom 事件不触发的问题
luckyadam Oct 29, 2019
e975cf5
fix(quickapp): pull-down-refresh page-scroll
ZakaryCode Oct 31, 2019
f76f725
feat: stop trans asset for quickapp
ZakaryCode Oct 31, 2019
b49b187
fix: somethings no need
ZakaryCode Oct 31, 2019
426f8a0
fix(mini-runner): 移除无用代码
luckyadam Nov 5, 2019
ce09711
chore(release): publish v2.0.0-beta.0
luckyadam Nov 5, 2019
167f232
chore: changelog
luckyadam Nov 5, 2019
995c246
merge
luckyadam Nov 12, 2019
cddf7f5
chore(release): publish v2.0.0-beta.1
luckyadam Nov 13, 2019
45c5d19
chore: changelog
luckyadam Nov 13, 2019
97914e4
fix(mini-runner): 修复对 alias 的支持
luckyadam Nov 14, 2019
3992c8e
chore(release): publish v2.0.0-beta.2
luckyadam Nov 14, 2019
4271e70
chore: changelog && docs
luckyadam Nov 14, 2019
1e5342a
fix(taro-cli): update package list 新增 @tarojs/mini-runner,对列表排序
Garfield550 Nov 15, 2019
a668747
docs: 更新异步编程文档
luckyadam Nov 18, 2019
a45e436
feat(docs): 更新 2.0 版本使用 async-await 的文档 #4837
Garfield550 Nov 19, 2019
962ef02
fix(mini-runner): 组件引入支持统一从一个入口文件中引入
luckyadam Nov 19, 2019
9603801
fix(mini-runner): 更新编译时提示
luckyadam Nov 19, 2019
fbf4d76
chore(release): publish v2.0.0-beta.3
luckyadam Nov 19, 2019
e452171
chore: changelog
luckyadam Nov 19, 2019
7187833
docs(readme): 增加版本选择提示
Garfield550 Nov 19, 2019
81f8842
chore: 更新 i18n 文件
Garfield550 Nov 19, 2019
76f9aa4
fix(cli): 更新默认模板
luckyadam Nov 21, 2019
4c945f6
fix(template): 更新 Taro 2.0 的模版和下载地址 #4837
Garfield550 Nov 21, 2019
2704979
feat(taro-cli): 配置文件分开存放,优化 taro config 输出
Garfield550 Nov 21, 2019
242c2d2
feat(components-qa): 增强快应用button组件,增加属性判断及点击变色等 (#4882)
Nov 21, 2019
9d9c4d5
chore(release): publish v2.0.0-beta.4
luckyadam Nov 21, 2019
c96958a
chore: changelog && docs
luckyadam Nov 21, 2019
b29778d
fix(mini-runner): 修复小程序编译时样式中引用静态资源转换为 base64
luckyadam Nov 27, 2019
e5631b2
fix(mini-runner): 修复 watch 时文件报错导致无法重新编译的问题,fix #4949
luckyadam Nov 28, 2019
009b565
docs: 去除已经废除的h5.webpack配置
Littly Nov 28, 2019
f5fdd3e
fix(cli): 修正快应用依赖项安装命令在windows不兼容问题 (#4954)
Nov 28, 2019
481edd4
fix(mini-runner): 快应用页面路径编译错误
luckyadam Nov 28, 2019
8db81f3
fix(components-qa): 改进 button 动画效果展示,引入 css 属性描述文件 (#4898)
Nov 30, 2019
3179958
fix修正快应用Manifest配置文件,在windows下json转换时反斜杆‘\\’路径问题 (#4979)
Dec 2, 2019
84178bf
fix(mini-runner): 修正快应用pages中ux文件未正确生成问题 (#4969)
Dec 2, 2019
6b5d3a8
fix(cli): 解决 cli 编译时缺少 @types/react 依赖问题 (#4997)
Dec 3, 2019
878b65c
fix(mini-runner): 修复 sass 变量失效的问题,close #4893
luckyadam Dec 3, 2019
00c4065
fix(mini-runner): 加入 preval 支持
luckyadam Dec 3, 2019
724ccd3
fix(mini-runner): 修复 windows 下编译后 taro 引用错误的问题
luckyadam Dec 3, 2019
42b12e0
fix(mini-runner): 组件中 $componentPath 路径生成不对
luckyadam Dec 3, 2019
13ef7ea
fix(mini-runner): 组件引用支持 import as 语法
luckyadam Dec 3, 2019
60f239a
chore(release): publish v2.0.0-beta.5
luckyadam Dec 3, 2019
803a2f3
chore: changelog && docs
luckyadam Dec 3, 2019
9df2d10
fix(mini-runner): 修复分包页面丢失的问题
luckyadam Dec 4, 2019
6f73fdc
chore(release): publish v2.0.0-beta.6
luckyadam Dec 4, 2019
bbbdcbd
chore: changelog && docs
luckyadam Dec 4, 2019
4fd3273
fix(taro-webpack-runner): 修复 sassLoaderOption 未定义的问题
Garfield550 Dec 5, 2019
1ccf229
fix(mini-runner): 优化 watch 时文件编译速度
luckyadam Dec 5, 2019
61a0390
fix(mini-runner): 修复页面 hooks config 失效问题
luckyadam Dec 5, 2019
5a25161
feat(taro-runner-utils): 添加 @tarojs/runner-utils 包
Garfield550 Dec 5, 2019
835df61
fix(taro-runner-utils): 优化代码,修复找不到类型定义的问题
Garfield550 Dec 6, 2019
d0f3db9
feat: webpack-runner 和 mini-runner 代码优化
Garfield550 Dec 6, 2019
dae3e2f
feat(taro-runner-utils): 添加单元测试和优化注释
Garfield550 Dec 6, 2019
f7bbf25
fix(taro): 增加递归查找中止条件,修正拼写错误 (#5045)
Dec 10, 2019
4649a1c
fix(mini-runner): 增加快应用公共属性的自动更新,优化button动画直接调用 (#5044)
Dec 10, 2019
b949dc5
fix(mini-runner): 修复包未安装不报错的问题
luckyadam Dec 11, 2019
f0165c0
fix(mini-runner): 修复引用原生组件报错的问题
luckyadam Dec 11, 2019
a01c0aa
fix(mini-runner): 修复引用原生组件编译后样式文件缺失的问题
luckyadam Dec 11, 2019
332ed23
fix(mini-runner): 暴露 commonChunks 配置以供自定义公共 chunks 生成
luckyadam Dec 11, 2019
b04cfa3
chore(release): publish v2.0.0-beta.7
luckyadam Dec 11, 2019
b16720b
fix(mini-runner): 修复使用 preval 报错的问题
luckyadam Dec 12, 2019
4458b93
fix: for video objectFit
ZakaryCode Dec 12, 2019
a3d7f2d
chore(deps-dev): bump enzyme from 3.9.0 to 3.10.0 (#4875)
dependabot-preview[bot] Dec 12, 2019
ca54d29
chore(deps-dev): bump babel-preset-jest from 22.4.4 to 25.0.0 (#4623)
dependabot-preview[bot] Dec 12, 2019
629bdd1
chore(release): publish v2.0.0-beta.8
luckyadam Dec 12, 2019
63f0fff
chore: changelog && docs
luckyadam Dec 12, 2019
968bf24
docs: 更新 readme
luckyadam Dec 12, 2019
1efefaf
chore(deps): [security] bump mixin-deep from 1.3.1 to 1.3.2 (#5073)
dependabot-preview[bot] Dec 13, 2019
32c8674
chore(deps): bump ejs from 2.7.1 to 3.0.1 (#5075)
dependabot-preview[bot] Dec 13, 2019
63de32c
docs: 增加特别鸣谢
luckyadam Dec 13, 2019
3f9f407
fix(mini-runner): 修复 defineConstants 小程序表现与 H5 不一致问题 close #5078
Garfield550 Dec 13, 2019
d95341c
chore(deps-dev): bump @types/enzyme from 3.9.1 to 3.10.4 (#5082)
dependabot-preview[bot] Dec 14, 2019
5cec2b4
chore(deps-dev): bump @types/webpack from 4.4.31 to 4.41.0 (#5081)
dependabot-preview[bot] Dec 14, 2019
289678e
feat(weapp): taro config add style typing (#5090)
Dec 16, 2019
9e14341
fix: use rimraf instead of rm to fixed Windows build error
Garfield550 Dec 16, 2019
a040671
chore(deps): bump klaw from 2.1.1 to 3.0.0 (#5097)
dependabot-preview[bot] Dec 17, 2019
164f8af
fix(cli): 2.0.0-beta.8. 编译RN报错 'babel' of undefined close #5093
Pines-Cheng Dec 17, 2019
d5b2300
chore(deps-dev): bump rollup-plugin-postcss from 1.6.3 to 2.0.3 (#5113)
dependabot-preview[bot] Dec 18, 2019
cb2233d
Merge branch '1.3.30' into 2.x
yuche Dec 18, 2019
63392d7
chore(release): publish v2.0.0-beta.9
yuche Dec 18, 2019
5309def
chore: changelog & docs
yuche Dec 18, 2019
4493b7f
fix(cli): add taro-rn package in template to pass cli version validate
Pines-Cheng Dec 19, 2019
e602a0c
fix(types): add enableFlex to ScrollViewProps (#5142)
SunskyXH Dec 20, 2019
05afa1b
chore: merge 2.x
yuche Dec 20, 2019
40339fc
chore(release): publish v2.0.0-beta.10
yuche Dec 20, 2019
3c0436a
chore: changelog & docs
yuche Dec 20, 2019
25b1fdc
增加TARO-UI侧的快应用转换支持,不支持部分组件默认支持为DIV,支持部分默认为原生组件名
Dec 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 273 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

> 👽 Taro['tɑ:roʊ],泰罗·奥特曼,宇宙警备队总教官,实力最强的奥特曼。

## 版本

[1.x 版本文档](https://nervjs.github.io/taro/docs/1.3.29/README.html)

## 简介

**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。现如今市面上端的形态多种多样,Web、React-Native、微信小程序等各种端大行其道,当业务同时在不同的端都要求有所表现的时候,针对不同的端编写多套代码的成本显然非常高,这时只编写一套代码就能适配到多端的能力就显得极为重要。
Expand Down Expand Up @@ -132,9 +136,9 @@ Taro 方案的初心就是为了打造一个多端开发的解决方案。目前

## 特别鸣谢

[![nanjingboy](https://avatars1.githubusercontent.com/u/1390888?s=100&v=4)](https://github.com/nanjingboy/) | [![jsNewbee](https://avatars3.githubusercontent.com/u/20449400?s=100&v=4)](https://github.com/js-newbee/) | [![Qiyu8](https://avatars2.githubusercontent.com/u/15245051?s=100&v=4)](https://github.com/Qiyu8/)
:---:|:---:|:---:
[nanjingboy](https://github.com/nanjingboy/) | [jsNewbee](https://github.com/js-newbee/) | [Qiyu8](https://github.com/Qiyu8/)
[![nanjingboy](https://avatars1.githubusercontent.com/u/1390888?s=100&v=4)](https://github.com/nanjingboy/) | [![jsNewbee](https://avatars3.githubusercontent.com/u/20449400?s=100&v=4)](https://github.com/js-newbee/) | [![Qiyu8](https://avatars2.githubusercontent.com/u/15245051?s=100&v=4)](https://github.com/Qiyu8/) | [![Hanqin](https://avatars3.githubusercontent.com/u/6348297?s=100&v=4)](https://github.com/shenghanqin/)
:---:|:---:|:---:|:---:
[nanjingboy](https://github.com/nanjingboy/) | [jsNewbee](https://github.com/js-newbee/) | [Qiyu8](https://github.com/Qiyu8/)| [Hanqin](https://github.com/shenghanqin/)

## 贡献者们

Expand Down
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: Taro 介绍
---

> 这是 Taro 2.x 版本的文档,若要查看 1.x 版本的文档,请[点击这里选择版本](/taro/versions.html)。

## 简介

**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。
Expand Down
39 changes: 30 additions & 9 deletions docs/async-await.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,40 @@
title: 异步编程
---

Taro 支持使用 `async functions` 来让开发者获得不错的异步编程体验,开启 `async functions` 支持需要安装包 `@tarojs/async-await`
> Taro 2.x 版本中使用 `async-await` 不再需要 `@tarojs/async-await`。

Taro 支持使用 `async functions` 来让开发者获得不错的异步编程体验,开启 `async functions` 支持需要安装包 `babel-plugin-transform-runtime` 和 `babel-runtime`。

```bash
$ yarn add @tarojs/async-await
# 或者使用 npm
$ npm install --save @tarojs/async-await
$ yarn add babel-plugin-transform-runtime --dev
$ yarn add babel-runtime
```

随后在项目入口文件 `app.js` 中直接 `import` ,就可以开始使用 `async functions` 功能了
随后修改项目 [`babel` 配置](./config-detail.md#babel),增加插件 `babel-plugin-transform-runtime`。

```javascript
// src/app.js
import '@tarojs/async-await'
```js
babel: {
sourceMap: true,
presets: [
[
'env',
{
modules: false
}
]
],
plugins: [
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread',
['transform-runtime', {
"helpers": false,
"polyfill": false,
"regenerator": true,
"moduleName": 'babel-runtime'
}]
]
}
```

> 值得注意的事,使用 `@tarojs/async-await` 一定要记得按照[开发前注意](./before-dev-remind.md)中提示的内容进行操作,否则会出现报错
> 值得注意的事,使用 `async functions` 一定要记得按照[开发前注意](./before-dev-remind.md)中提示的内容进行操作,否则会出现报错
Loading