chore(doc): change readme & homepage intro

This commit is contained in:
zoomchan-cxj
2021-07-21 23:40:38 +08:00
parent e7a3248849
commit bad9fde290
5 changed files with 131 additions and 63 deletions
+2 -1
View File
@@ -8,5 +8,6 @@
},
"no-inline-html" : {
"allowed_elements" : [ "a", "h1", "h3", "HR", "p", "br" ]
}
},
"no-bare-urls": false
}
+49
View File
@@ -0,0 +1,49 @@
Abel Chen(陈曦) <sync_spar@163.com> @CX3201
Abigale Yu(余佩纯) <abigaleypc@gmail.com> @abigaleypc
Aliar Mo(莫宝军) <1615064691@qq.com> @aliarmo
Arylo Yeung(杨毅英) <arylo.open@gmail.com> @arylo
Botmain Li(李俊宁) <g123nn@hotmail.com> @BOT-Man-JL
Caesar Wang(王跃龙) <greatloong@gmail.com> @greatloong
Calvin Ma(马铖) <mc@mc-zone.me> @mc-zone
Ceason Cai(蔡英珏) <caiyingjue@qq.com> @ceasoncai
Ceso Xiong(熊杰) <285516193@qq.com> @cexoso
Chuan Yang(杨传华) <840817743@qq.com> @gongziya
Echo Wang(王琴玲) @echoontheway
Ed Sheng(盛波) <303449538@qq.com> @shengbo1992
Foogry Wang(王中周) <wzzvictory_tjsd@163.com> @wangzz
Frodo Chen(陈小聪) <idiottiger.nexus5@gmail.com> @idiottiger
Hale Huang(黄灏涛) <hsqhht@gmail.com> @hotobear
Harry Guo(郭辛华) <iharryguo@gmail.com> @iharryguo
Sai Zhao(赵宏罡) <1152534558@qq.com> @shatuo-sai
Howl Pan(潘剑辉) <76324298@qq.com>
Husky Yu(于洲) <happyz90@gmail.com> @happyz90
Ian Wang(王磊) <honwsn@gmail.com> @honwsn
Jacy Huang(黄伟杰) <jacyhuang.zhu@gmail.com> @huangweijie
Johnston Li(李孙长) <johnstonli@vip.qq.com> @johnstonli
Justin Yang(杨智) <youngdze94@gmail.com> @youngdze
Kun Luo(罗坤) <luokun19@gmail.com> @kunluo
Leonard Gong(龚超) <gcdofree@gmail.com> @gcdofree
Lucas Pei(裴伟) <daochuguangguang@qq.com> @peiweippww
Lucky Zeng(曾兴云) <tsangint@gmail.com> @tsangint
Mandy Luo(罗丹燕) <543209484@qq.com> @danyan
Max Li(李思广) <siguangli@qq.com> @siguangli
Mengyan Luo(罗梦砚) <ozonelmy@gmail.com> @ozonelmy
Neco Dong(董鹏) <dpengne@gmail.com> @dpsp
Paul Zeng(曾义) <paulzengyi@gmail.com> @paulzengyi
Penny Li(李鹏) <cocoamad@gmail.com> @iampennyli
Phantom Qi(漆星剑) <phantomqi@qq.com> @PhantomQi
Ping Ji(纪锦平) <38700235@qq.com> @CAaRrLl
Polly Zhang(张龙) <long.dragon.zhang@gmail.com> @churchill-zhang
Rainy Wan(万致远) <121420023@qq.com> @RainyTunes
Rickie Zheng(郑锐奇) <rqzheng2008@126.com> @rqzheng2015
Roy Guo(郭翔) <gx7611@gmail.com> @gx761
Rm Li(李法镜) <88327067@qq.com> @risingmine
Robins Li(李龙彬) <38700235@qq.com> @robinsli
Super Zheng(郑苏波) <medns@126.com> @medns
Weijie Zhu(朱伟杰) <weijiezhu0204@gmail.com> @WeijieZhu0204
XQ Kuang(旷旭卿) <x@kxq.io> @xuqingkuang
Xiandong Luo(罗先东) <706659874@qq.com> @xiandongluo
Xilei Wang(王喜磊) <iap_apple@126.com> @helloXixi
Yong Wang(王勇) <ccywang@foxmail.com> @ccgwang
Yonghao Hu(胡永豪) <542932638@qq.com> @foreverhyh
Youkun Huang(黄友昆) <youkunhuang@tencent.com> @huangyoukun
+78 -58
View File
@@ -1,6 +1,6 @@
# Hippy Cross Platform Framework
![Hippy Group](https://img.shields.io/badge/group-Hippy-blue.svg) [![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/Tencent/Hippy/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/Hippy/pulls) ![node](https://img.shields.io/badge/node-%3E%3D10.0.0-green.svg) [![Actions Status](https://github.com/Tencent/Hippy/workflows/build/badge.svg?branch=master)](https://github.com/Tencent/Hippy/actions) [![Codecov](https://img.shields.io/codecov/c/github/Tencent/Hippy)](https://codecov.io/gh/Tencent/Hippy)
![Hippy Group](https://img.shields.io/badge/group-Hippy-blue.svg) [![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/Tencent/Hippy/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/Hippy/pulls) ![node](https://img.shields.io/badge/node-%3E%3D10.0.0-green.svg) [![Actions Status](https://github.com/Tencent/Hippy/workflows/build/badge.svg?branch=master)](https://github.com/Tencent/Hippy/actions) [![Codecov](https://img.shields.io/codecov/c/github/Tencent/Hippy)](https://codecov.io/gh/Tencent/Hippy) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Tencent/Hippy)
English | [简体中文](./README.zh_CN.md) | [Homepage](//tencent.github.io/Hippy/)
@@ -8,7 +8,9 @@ English | [简体中文](./README.zh_CN.md) | [Homepage](//tencent.github.io/Hip
Hippy is a cross-platform development framework, aiming to help developers write once, run on three platforms(iOS, Android and Web). Hippy is quite friendly to web developers, especially who are familiar with React or Vue. With Hippy, developers are able to create the cross platform app easily.
Hippy is now applied in 27 [Tencent](http://www.tencent.com/) apps such as Mobile QQ, Mobile QQ Browser, Tencent Video App, QQ Music App,reaching hundreds of millions of ordinary users.
Hippy is now applied in 27+ [Tencent](http://www.tencent.com/) apps such as Mobile QQ, Mobile QQ Browser, Tencent Video App, QQ Music App,Tencent News, reaching hundreds of millions of ordinary users.
https://user-images.githubusercontent.com/12878546/126472924-650c3ca1-62ca-4bc1-bb6e-739dbe21a277.mp4
## Advantages
@@ -19,6 +21,70 @@ Hippy is now applied in 27 [Tencent](http://www.tencent.com/) apps such as Mobil
* Smoothly and gracefully migrate to web browser.
* Fully supported Flex [Layout engine](./layout).
## Getting started
### Preparing environment
For macOS developers:
1. [Xcode](https://developer.apple.com/xcode/) with iOS sdk: build the iOS app.
2. [Android Studio](https://developer.android.com/studio) with NDK: build the android app.
3. [Node.JS](https://nodejs.org/en/): run the build scripts.
[homebrew](https://brew.sh/) is recommended to install the dependencies.
For Windows developers:
1. [Android Studio](https://developer.android.com/studio) with NDK: build the android app.
2. [Node.JS](https://nodejs.org/en/): run the build scripts.
> Windows can't run the iOS development environment so far.
### Build the iOS simulator with js demo
For iOS we recommend to use iOS simulator when first try. However, you can change the Xcode configuration to install the app to iPhone if you are an iOS expert.
1. Install the project build scripts dependencies at root directory with `npm install`.
2. Install dependencies of each npm package at root directory with `lerna bootstrap`.
(Hippy uses [Lerna](https://lerna.js.org/) to manage multi js packages, if `lerna` command is not found, execute `npm install lerna -g` first.)
3. Build each front-end sdk package at root directory with `npm run build`.
4. Choose a demo to build with `npm run buildexample -- [hippy-react-demo|hippy-vue-demo]` at root directory.
5. Start the Xcode and build the iOS app with `open examples/ios-demo/HippyDemo.xcodeproj`.
### Build the Android app with js demo
For Android, we recommend using the real cellphone for better develop experience, because Hippy is using [X5](https://x5.tencent.com/) JS engine which can't support x86 simulator, as well as ARM simulator has a low performance.
Before build the android app, please make sure the SDK and NDK is installed, And *DO NOT* update the build toolchain.
1. Install the whole project dependencies at root directory with `npm install`.
2. Install dependencies of each npm package at root directory with `lerna bootstrap`.
(Hippy uses [Lerna](https://lerna.js.org/) to manage multi js packages, if `lerna` command is not found, execute `npm install lerna -g` first.)
3. Build each front-end sdk package at root directory with `npm run build`.
4. Choose a demo to build with `npm run buildexample -- [hippy-react-demo|hippy-vue-demo]` at root directory.
5. Open the `examples/android-demo` with Android Studio.
6. Connect Android phone with USB cable and make sure USB debugging mode is enabled(Run `adb devices` on the computer terminal to check cellphone connection status).
7. Open the project with Android Studio, run and install the apk.
> If you encounter the issue of `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`, here is the [solution](https://github.com/google/filament/issues/15#issuecomment-415423557).
### Debug the js demo
1. Follow [Build the iOS simulator with js demo](https://github.com/Tencent/Hippy#build-the-ios-simulator-with-js-demo) or [Build the Android app with js demo](https://github.com/Tencent/Hippy#build-the-android-app-with-js-demo) first to build the App.
2. `cd` to `examples` hippy-react-demo or hippy-vue-demo.
3. Run `npm install` to install demo js dependencies.
4. Run `npm run hippy:dev` and `npm run hippy:debug` respectively to start the live debug mode.
> On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` at root directory again. More details for debug can be read in [Hippy Debug Document](https://hippyjs.org/#/guide/debug).
## Documentation
To check out [hippy examples](https://github.com/Tencent/Hippy/tree/master/examples) and visit [hippyjs.org](https://hippyjs.org).
## Changelog
Detailed changes for each release version are documented in the [project release notes](https://github.com/Tencent/Hippy/releases).
## Project structure
```text
@@ -43,68 +109,16 @@ Hippy
│   ├── support_ui # Android native components.
│   └── sdk # Android SDK.
├── core # JS modules implemented by C++, binding to JS engine.
├── docker # Native release docker image and build scripts.
├── layout # Hippy layout engine.
└── scripts # Project build script.
```
## Getting started
### Preparing environment
For macOS developers:
1. [Xcode](https://developer.apple.com/xcode/) with iOS sdk: build the iOS app.
2. [Android Studio](https://developer.android.com/studio) with NDK: build the android app.
3. [Node.JS](https://nodejs.org/en/): run the build scripts.
[homebrew](https://brew.sh/) is recommended to install the dependencies.
For Windows developers:
1. [Android Studio](https://developer.android.com/studio) with NDK: build the android app.
2. [Node.JS](https://nodejs.org/en/): run the build scripts.
> Windows can't run the iOS development environment so far.
### Build your first Hippy app
### Start the iOS simulator with hippy-react or hippy-vue demo
For iOS we recommend to use iOS simulator when first try, however, you may change the Xcode configuration to install the app to iPhone if you are an iOS expert.
1. Install the dependencies at root directory with `npm install`.
2. Install dependencies of each npm package at root directory with `lerna bootstrap`.
(Hippy uses [Lerna](https://lerna.js.org/) to manage multi js packages, if `lerna` command is not found, execute `npm install lerna -g` first.)
3. Build the front-end sdk packages at root directory with `npm run build`.
4. Choose a demo to build with `npm run buildexample -- [hippy-react-demo|hippy-vue-demo]` at root directory.
5. Start the Xcode and build the iOS app with `open examples/ios-demo/HippyDemo.xcodeproj`.
6. `cd` to `examples` hippy-react-demo or hippy-vue-demo, run `npm install` to install demo js dependencies, then run `npm run hippy:dev` and `npm run hippy:debug` respectively to start the live debug mode
On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `packages` > `[different package]` >`dist`, so if you have changed package source code and want to make it take effect in examples, please call `npm run build` at root directory again.
### Start the android app with hippy-react or hippy-vue demo
For Android we recommend to use the real cellphone for better experience, because Hippy is using [X5](https://x5.tencent.com/) JS engine which can't support x86 simulator, as well as ARM simulator has a low performance.
Before build the android app, please make sure the SDK and NDK is installed, And *DO NOT* update the build toolchain.
1. Install the dependencies at root directory with `npm install`.
2. Install dependencies of each npm package at root directory with `lerna bootstrap`.
(Hippy uses [Lerna](https://lerna.js.org/) to manage multi js packages, if `lerna` command is not found, execute `npm install lerna -g` first.)
3. Build the front-end sdk packages at root directory with `npm run build`.
4. Choose a demo to build with `npm run buildexample -- [hippy-react-demo|hippy-vue-demo]` at root directory.
5. Open the `examples/android-demo` with Android Studio.
6. Connect Android phone with USB cable and make sure USB debugging mode and USB installation are enabled.
7. Open the project with Android Studio, run and install the apk.
8. `cd` to `examples` hippy-react-demo or hippy-vue-demo, run `npm install` to install demo js dependencies, then run `npm run hippy:dev` and `npm run hippy:debug` respectively to start the live debug mode.
On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `packages` > `[different package]` >`dist`, so if you have changed package source code and want to make it take effect in examples, please call `npm run build` at root directory again.
> If you encounter the issue of `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`, here is the [solution](https://github.com/google/filament/issues/15#issuecomment-415423557).
## Contribution
Developers are welcome to contribute to Tencent's open source, and we will also give them incentives to acknowledge and thank them. Here we provide an official description of Tencent's open source contribution. Specific contribution rules for each project are formulated by the project team. Developers can choose the appropriate project and participate according to the corresponding rules. The Tencent Project Management Committee will report regularly to qualified contributors and awards will be issued by the official contact.
Developers are welcome to contribute to Tencent's open source, and we will also give them incentives to acknowledge and thank them. Here we provide an official description of Tencent's open source contribution. Specific contribution rules for each project are formulated by the project team. Developers can choose the appropriate project and participate according to the corresponding rules. The Tencent Project Management Committee will report regularly to qualified contributors and awards will be issued by the official contact. Before making a pull request or issue to Hippy, please make sure to read [Contributing Guide](https://github.com/Tencent/Hippy/blob/master/.github/CONTRIBUTING.md).
All the people who already contributed to Hippy can be seen at [Contributors](https://github.com/Tencent/Hippy/graphs/contributors) and [Authors File](https://github.com/Tencent/Hippy/blob/master/AUTHORS)
## Stargazers over time
@@ -113,3 +127,9 @@ Developers are welcome to contribute to Tencent's open source, and we will also
## License
Hippy is [Apache-2.0 licensed](./LICENSE).
## Links
[Hippy Eco-System](https://github.com/hippy-contrib)
[Taitank Layout Engine](https://github.com/Tencent/Taitank)
+1 -2
View File
@@ -94,8 +94,7 @@ import icon from './qb_icon_new.png';
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
| horizontal | 指定 `ListView` 是否采用横向布局。`default: undefined` | `any` | `Android` |
| initialListSize | 指定在组件刚挂载的时候渲染多少行数据。用这个属性来确保首屏显示合适数量的数据,而不是花费太多帧时间逐步显示出来。 | `number` | `ALL` |
| numberOfRows | 指定列表的行数,一般直接传入数据源条数 `length` 即可。 | `number` | `ALL` |
| initialContentOffset | 初始位移值 -- 在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。 | `number` | `ALL` |
| initialContentOffset | 初始位移值 -- 在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。 | `number` | `iOS` |
| renderRow | 这里的入参是当前row 的index,在这里可以凭借index 获取到具体这一行单元格的数据,从而决定如何渲染这个单元格。 | `(index: number) => Node` | `ALL` |
| getRowStyle | 设置`ListViewItem`容器的样式。当设置了 `horizontal=true` 启用横向 `ListView` 时,需显式设置 `ListViewItem` 宽度 | `(index: number) => styleObject` | `ALL` |
| getRowType | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升list 性能。 | `(index: number) => number` | `ALL` |
+1 -2
View File
@@ -304,8 +304,7 @@ Hippy 的重点功能,高性能的可复用列表组件。里面第一层只
| 参数 | 描述 | 类型 | 支持平台 |
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
| horizontal | 指定 `ul` 是否采用横向布局。`default: undefined` | `any` | `Android` |
| numberOfRows | 指定列表的行数,一般直接传入数据源条数 `length` 即可。 | `number` | `ALL` |
| initialContentOffset | 初始位移值 -- 在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。 | `number` | `ALL`
| initialContentOffset | 初始位移值 -- 在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。 | `number` | `iOS`
| rowShouldSticky | 设置 `ul` 是否需要开启悬停效果能力,与 `li` 的 `sticky` 配合使用 | `boolean` | `ALL`
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件,默认 200ms | `number` | `ALL` |
| showScrollIndicator | 是否显示垂直滚动条。 因为目前 ListView 其实仅有垂直滚动一种方向,水平滚动会导致 `onEndReached` 等一堆问题暂不建议使用,所以 `showScrollIndicator` 也仅用来控制是否显示垂直滚动条。 | `boolean` | `ALL` |