Skip to content

Commit fa3ce09

Browse files
author
wuchaobin
committed
prepare open source
0 parents  commit fa3ce09

File tree

710 files changed

+70455
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

710 files changed

+70455
-0
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
.dart_tool/
3+
4+
.packages
5+
.pub/
6+
7+
build/
8+
.idea/
9+
faircyarn.lock
10+
yarn-error.log
11+
node_modules/
12+
fairc
13+
yarn.lock
14+
yarn.error
15+
example/pubspec.lock
16+
fair/pubspec.lock
17+
example/ios/Podfile.lock
18+
fair_compiler/test
19+
doc/.vuepress/public/api
20+
doc/.vuepress/public/project/
21+
doc/.vuepress/dist/
22+
github-pages/
23+
samples/fair_example

LICENSE

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (C) 2005-present, 58.com. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of 58.com nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSE-FLUTTER

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2014 The Flutter Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README-en.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
![social preview](social-dark.png)
2+
3+
<p align="center">
4+
<a href="https://pub.dev/packages/fair"><img src="https://img.shields.io/pub/v/fair.svg" alt="pub"></a>
5+
<a href="https://github.com/wuba/fair"><img src="https://img.shields.io/badge/flutter-Android%7CiOS%7CWeb-blue.svg" alt="github"></a>
6+
<a href="https://fair.58.com/"><img src="https://img.shields.io/badge/doc-fair.58.com-green.svg" alt="doc"></a>
7+
<a href="https://github.com/wuba/fair/LICENSE"><img src="https://img.shields.io/badge/license-BSD-green.svg" alt="license"></a>
8+
</p>
9+
[简体中文](README.md)|[English](README-en.md)
10+
11+
---
12+
13+
# WIP
14+
15+
Flutter Fair is a new package used to update widget tree dynamically.
16+
17+
> document: [https://fair.58.com/](https://fair.58.com/)
18+
19+
![](fair/what-is-fair-en.png)
20+
21+
Fair的UI渲染是无损的,可以做到像素级别的还原,看一张转义Best Flutter UI Templates部分页面后的效果:
22+
23+
![best-ui-template](best-ui-template.png)
24+
25+
> This template project is from: https://github.com/mitesh77/Best-Flutter-UI-Templates
26+
27+
## 🏛Architecture
28+
29+
![fair architecture](fair.png)
30+
31+
## 🚀 Running
32+
33+
Please check the runtime environment on your computer. Fair is based on Flutter 1.20.4 & 1.22.4 .The latest stable flutter version will continue to be supported in the future. Currently supported versions are listed bellow (If you encounter problems, issue feedback):
34+
35+
| Flutter Version | Dart Version|
36+
| ------------------------ | ----------- |
37+
| Flutter 1.22.4/1.22.5 | Dart 2.10.4 |
38+
| Flutter 1.20.4 | Dart 2.9.2 |
39+
| Flutter 1.17.3 | Dart 2.8.4 |
40+
| Flutter 1.12.13+hotfix.9 | Dart 2.7.2 |
41+
42+
> https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
43+
44+
Fair的example位于fair/example目录,同时也附带了一些社区demo并转为fair动态化形式,工程位于samples目录下,克隆后直接build对应仓库即可即可。
45+
46+
```
47+
samples
48+
├── adobe_xd // adobe_xd插件demo, xd插件可以从设计稿直接导出flutter代码
49+
├── best_flutter_ui_templates // 一个UI很漂亮的Flutter模板项目
50+
└── my_app // 经典的Flutter Hello World
51+
├── README.md
52+
├── android
53+
├── assets
54+
├── build
55+
├── ios
56+
├── lib
57+
├── my_app.iml
58+
├── pubspec.lock
59+
├── pubspec.yaml
60+
├── test
61+
└── web
62+
```
63+
64+
更多接入操作请参考 [https://fair.58.com/](https://fair.58.com/)
65+
66+
## 📎相关介绍
67+
* [Flutter动态化框架Fair文档上线&开源倒计时](https://juejin.cn/post/6901600898603024391)
68+
* [Flutter动态化框架Fair的设计与思考](https://juejin.cn/post/6896655572910014478)
69+
70+
## 🕰2020&2021 Roadmap
71+
72+
* 开源准备 2020
73+
* 项目清理 ✅
74+
* 对外文档准备 ✅
75+
* 官网准备 https://fair.58.com ✅
76+
* Github开源 https://github.com/wuba/fair ✅
77+
* i18n ⚠️✅
78+
* Bug修复
79+
* Github issue处理
80+
* 维护迭代 2021
81+
* Framework适配优化
82+
* 局部刷新支持 ✅
83+
* 状态库支持Provider
84+
* 独立cli工具
85+
* 转化优质Demo ✅
86+
* 动画支持的形式
87+
* Flutter Favorite Package支持
88+
* 其他Top UI Package支持
89+
* 逻辑组件优化 ✅
90+
* CI流程
91+
* 社区插件贡献方式
92+
93+
## ⚠️Unsupported Features
94+
由于dart语法解析工作量奇大,逻辑运算均不支持,由逻辑运算延伸的表达式则更多。
95+
下面是一些,不支持特性&已知问题:
96+
97+
* 逻辑表达式,比如加减乘除,字符拼接,循环遍历语法等
98+
* 链式点语法,如:Colors.black.withOpacity(0.59),Colors.xxx本身是支持的,但是再次转换透明的则不支持
99+
* 匿名Builder函数,如ListView的的builder属于逻辑运算,需要封装为组件
100+
101+
## 🔧Contributing
102+
通过[Issue](https://github.com/wuba/fair/issues)提交问题,贡献代码走Pull Request,管理员将对代码进行审核。
103+
104+
## LICENSE
105+
Fair项目基于[BSD协议](LICENSE)开源。我们使用的更多依赖库详见pubspec.yaml
106+
107+
> 感谢UXD的**Kaibin**老师提供设计支持
108+

README.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
![social preview](social-dark.png)
2+
3+
<p align="center">
4+
<a href="https://pub.dev/packages/fair"><img src="https://img.shields.io/pub/v/fair.svg" alt="pub"></a>
5+
<a href="https://github.com/wuba/fair"><img src="https://img.shields.io/badge/flutter-Android%7CiOS%7CWeb-blue.svg" alt="github"></a>
6+
<a href="https://fair.58.com/"><img src="https://img.shields.io/badge/doc-fair.58.com-green.svg" alt="doc"></a>
7+
<a href="https://github.com/wuba/fair/LICENSE"><img src="https://img.shields.io/badge/license-BSD-green.svg" alt="license"></a>
8+
</p>
9+
[简体中文](README.md)|[English](README-en.md)
10+
11+
---
12+
13+
Fair是为Flutter设计的,UI&模板动态化框架,用于动态更新Widget Tree。
14+
Flutter Fair is a new package used to update widget tree dynamically.
15+
16+
> 在线文档:[https://fair.58.com/](https://fair.58.com/)
17+
18+
![](fair/what-is-fair.png)
19+
20+
Fair的UI渲染是无损的,可以做到像素级别的还原,看一张转义Best Flutter UI Templates部分页面后的效果:
21+
22+
![best-ui-template](best-ui-template.png)
23+
24+
> 使用的工程来自 https://github.com/mitesh77/Best-Flutter-UI-Templates
25+
26+
## 🏛Architecture
27+
28+
![fair architecture](fair.png)
29+
30+
## 🚀 Running
31+
32+
为了方便接入&体验Fair框架,请确认你的Flutter运行环境,Fair基于Flutter 1.20.4开发,目前已适配至1.22.x, **推荐使用v1.22.5体验**
33+
34+
后续将继续支持最新稳定版本。目前支持版本(如遇问题,Issue反馈):
35+
36+
| Flutter版本 | Dart版本 |
37+
| ------------------------ | ----------- |
38+
| Flutter 1.22.4/1.22.5 | Dart 2.10.4 |
39+
| Flutter 1.20.4 | Dart 2.9.2 |
40+
| Flutter 1.17.3 | Dart 2.8.4 |
41+
| Flutter 1.12.13+hotfix.9 | Dart 2.7.2 |
42+
43+
> https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
44+
45+
Fair的example位于fair/example目录,同时也附带了一些社区demo并转为fair动态化形式,工程位于samples目录下,克隆后直接build对应仓库即可即可。
46+
47+
```
48+
samples
49+
├── adobe_xd // adobe_xd插件demo, xd插件可以从设计稿直接导出flutter代码
50+
├── best_flutter_ui_templates // 一个UI很漂亮的Flutter模板项目
51+
└── my_app // 经典的Flutter Hello World
52+
├── README.md
53+
├── android
54+
├── assets
55+
├── build
56+
├── ios
57+
├── lib
58+
├── my_app.iml
59+
├── pubspec.lock
60+
├── pubspec.yaml
61+
├── test
62+
└── web
63+
```
64+
65+
更多接入操作请参考 [https://fair.58.com/](https://fair.58.com/)
66+
67+
## 📎相关介绍
68+
* [Flutter动态化框架Fair文档上线&开源倒计时](https://juejin.cn/post/6901600898603024391)
69+
* [Flutter动态化框架Fair的设计与思考](https://juejin.cn/post/6896655572910014478)
70+
71+
## 🕰2020&2021 Roadmap
72+
73+
* 开源准备 2020
74+
* 项目清理 ✅
75+
* 对外文档准备 ✅
76+
* 官网准备 https://fair.58.com ✅
77+
* Github开源 https://github.com/wuba/fair ✅
78+
* i18n ⚠️✅
79+
* Bug修复
80+
* Github issue处理
81+
* 维护迭代 2021
82+
* Framework适配优化
83+
* 局部刷新支持 ✅
84+
* 状态库支持Provider
85+
* 独立cli工具
86+
* 转化优质Demo ✅
87+
* 动画支持的形式
88+
* Flutter Favorite Package支持
89+
* 其他Top UI Package支持
90+
* 逻辑组件优化 ✅
91+
* CI流程
92+
* 社区插件贡献方式
93+
94+
## ⚠️Unsupported Features
95+
由于dart语法解析工作量奇大,逻辑运算均不支持,由逻辑运算延伸的表达式则更多。
96+
下面是一些,不支持特性&已知问题:
97+
98+
* 逻辑表达式,比如加减乘除,字符拼接,循环遍历语法等
99+
* 链式点语法,如:Colors.black.withOpacity(0.59),Colors.xxx本身是支持的,但是再次转换透明的则不支持
100+
* 匿名Builder函数,如ListView的的builder属于逻辑运算,需要封装为组件
101+
102+
## 🔧Contributing
103+
通过[Issue](https://github.com/wuba/fair/issues)提交问题,贡献代码走Pull Request,管理员将对代码进行审核。
104+
105+
## LICENSE
106+
Fair项目基于[BSD协议](LICENSE)开源。我们使用的更多依赖库详见pubspec.yaml
107+
108+
> 感谢UXD的**Kaibin**老师提供设计支持
109+

best-ui-template.png

94.8 KB
Loading

deploy

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
##################################################################
3+
##
4+
## Publish static site
5+
## https://vuepress.vuejs.org/zh/guide/deploy.html#github-pages
6+
##
7+
## Author: Chaobin Wu
8+
9+
##
10+
#################################################################
11+
12+
set -e
13+
14+
yarn doc:build
15+
cd doc/.vuepress/dist
16+
echo 'fair.hacktons.cn' > CNAME
17+
18+
git init
19+
git add -A
20+
git commit -m 'deploy'
21+
22+
git push -f [email protected]:hacktons/fair.hacktons.cn.git master
23+
24+
cd -

doc/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_book/
2+
.DS_Store
3+
**/.DS_Store
4+
node_modules/

0 commit comments

Comments
 (0)