Skip to content

Commit

Permalink
chore: Example info modified
Browse files Browse the repository at this point in the history
  • Loading branch information
dohooo committed Jun 16, 2022
1 parent 506718e commit 091830a
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
${{ runner.os }}-yarn-
- run: yarn install
- run: cd ./example && yarn install && yarn build:web
- run: cd ./exampleExpo && yarn install && yarn build:web
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/web-build
publish_dir: ./exampleExpo/web-build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android.iml

# Cocoapods
#
example/ios/Pods
exampleBare/ios/Pods

# node.js
#
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ yarn

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
While developing, you can run the [example app](/exampleExpo/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

To start the packager:
To start build:

```sh
yarn example start
yarn dev
```

To run the example app on Android:

```sh
yarn example android
yarn android
```

To run the example app on iOS:

```sh
yarn example ios
yarn ios
```

To run the example app on Web:

```sh
yarn example web
yarn web
```

Make sure your code passes TypeScript and ESLint. Run the following to verify:
Expand Down Expand Up @@ -96,9 +96,9 @@ The `package.json` file contains various scripts for common tasks:
- `yarn typescript`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.
- `yarn dev`: start build.
- `yarn android`: run the example app on Android.
- `yarn ios`: run the example app on iOS.

### Sending a pull request

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ English | [简体中文](./README.zh-CN.md)
| <img src="assets/normal-horizontal.gif"/> | <img src="assets/normal-vertical.gif"/> | <img src="assets/parallax-horizontal.gif"/> |
| :--------------------------------------------------------------: | :---------------------------------------------------------------: | :----------------------------------------------------------------: |
| <a href="./example/src/normal/index.tsx">normal-horizontal</a> | <a href="./example/src/normal/index.tsx">normal-vertical</a> | <a href="./example/src/parallax/index.tsx">parallax-horizontal</a> |
| <a href="./exampleExpo/src/normal/index.tsx">normal-horizontal</a> | <a href="./exampleExpo/src/normal/index.tsx">normal-vertical</a> | <a href="./exampleExpo/src/parallax/index.tsx">parallax-horizontal</a> |
| <img src="assets/parallax-vertical.gif"/> | <img src="assets/stack-horizontal-left.gif"/> | <img src="assets/stack-horizontal-right.gif"/> |
| <a href="./example/src/parallax/index.tsx">parallax-vertical</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-left</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-right</a> |
| <a href="./exampleExpo/src/parallax/index.tsx">parallax-vertical</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-left</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-right</a> |
| <img src="assets/stack-vertical-left.gif"/> | <img src="assets/stack-vertical-right.gif"/> | <img src="assets/stack-horizontal-right.gif"/> |
| <a href="./example/src/stack/index.tsx">stack-vertical-left</a> | <a href="./example/src/stack/index.tsx">stack-vertical-right</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-right</a> |
| <a href="./exampleExpo/src/stack/index.tsx">stack-vertical-left</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-vertical-right</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-right</a> |

> Now you can make cool animations with us! Very easy! [[Details]](./docs/custom-animation.md)
| <img src="assets/advanced-parallax.gif"/> | <img src="assets/pause-advanced-parallax.gif"/> | <img src="assets/scale-fade-in-out.gif"/> |
| :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| <a href="./example/src/advanced-parallax/index.tsx">advanced-parallax</a> | <a href="./example/src/pause-advanced-parallax/index.tsx">pause-advanced-parallax</a> | <a href="./example/src/scale-fade-in-out/index.tsx">scale-fade-in-out</a> |
| <a href="./exampleExpo/src/advanced-parallax/index.tsx">advanced-parallax</a> | <a href="./exampleExpo/src/pause-advanced-parallax/index.tsx">pause-advanced-parallax</a> | <a href="./exampleExpo/src/scale-fade-in-out/index.tsx">scale-fade-in-out</a> |
| <img src="assets/rotate-scale-fade-in-out.gif"/> | <img src="assets/rotate-in-out.gif"/> | <img src="assets/anim-tab-bar.gif"/> |
| <a href="./example/src/rotate-scale-fade-in-out/index.tsx">rotate-scale-fade-in-out</a> | <a href="./example/src/rotate-in-out/index.tsx">rotate-in-out</a> | <a href="./example/src/anim-tab-bar/index.tsx">anim-tab-bar</a> |
| <a href="./exampleExpo/src/rotate-scale-fade-in-out/index.tsx">rotate-scale-fade-in-out</a> | <a href="./exampleExpo/src/rotate-in-out/index.tsx">rotate-in-out</a> | <a href="./exampleExpo/src/anim-tab-bar/index.tsx">anim-tab-bar</a> |
| <img src="assets/marquee.gif"/> | <img src="assets/multiple.gif"/> | |
| <a href="./example/src/marquee/index.tsx">marquee</a> | <a href="./example/src/multiple/index.tsx">multiple</a> | |
| <a href="./exampleExpo/src/marquee/index.tsx">marquee</a> | <a href="./exampleExpo/src/multiple/index.tsx">multiple</a> | |
| <img src="assets/parallax-layers.gif"/> | <img src="assets/flow.gif"/> | |
| <a href="./example/src/parallax-layers/index.tsx">parallax-layers</a> | <a href="./example/src/flow/index.tsx">flow</a> | |
| <a href="./exampleExpo/src/parallax-layers/index.tsx">parallax-layers</a> | <a href="./exampleExpo/src/flow/index.tsx">flow</a> | |

## Table of contents

Expand Down
14 changes: 7 additions & 7 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@
| <img src="assets/normal-horizontal.gif"/> | <img src="assets/normal-vertical.gif"/> | <img src="assets/parallax-horizontal.gif"/> |
| :--------------------------------------------------------------: | :---------------------------------------------------------------: | :----------------------------------------------------------------: |
| <a href="./example/src/normal/index.tsx">normal-horizontal</a> | <a href="./example/src/normal/index.tsx">normal-vertical</a> | <a href="./example/src/parallax/index.tsx">parallax-horizontal</a> |
| <a href="./exampleExpo/src/normal/index.tsx">normal-horizontal</a> | <a href="./exampleExpo/src/normal/index.tsx">normal-vertical</a> | <a href="./exampleExpo/src/parallax/index.tsx">parallax-horizontal</a> |
| <img src="assets/parallax-vertical.gif"/> | <img src="assets/stack-horizontal-left.gif"/> | <img src="assets/stack-horizontal-right.gif"/> |
| <a href="./example/src/parallax/index.tsx">parallax-vertical</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-left</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-right</a> |
| <a href="./exampleExpo/src/parallax/index.tsx">parallax-vertical</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-left</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-right</a> |
| <img src="assets/stack-vertical-left.gif"/> | <img src="assets/stack-vertical-right.gif"/> | <img src="assets/stack-horizontal-right.gif"/> |
| <a href="./example/src/stack/index.tsx">stack-vertical-left</a> | <a href="./example/src/stack/index.tsx">stack-vertical-right</a> | <a href="./example/src/stack/index.tsx">stack-horizontal-right</a> |
| <a href="./exampleExpo/src/stack/index.tsx">stack-vertical-left</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-vertical-right</a> | <a href="./exampleExpo/src/stack/index.tsx">stack-horizontal-right</a> |

> 现在你可以和我们一起来制作酷炫的动画了! 非常简单! [[详情]](./docs/custom-animation.zh-CN.md)
| <img src="assets/advanced-parallax.gif"/> | <img src="assets/pause-advanced-parallax.gif"/> | <img src="assets/scale-fade-in-out.gif"/> |
| :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| <a href="./example/src/advanced-parallax/index.tsx">advanced-parallax</a> | <a href="./example/src/pause-advanced-parallax/index.tsx">pause-advanced-parallax</a> | <a href="./example/src/scale-fade-in-out/index.tsx">scale-fade-in-out</a> |
| <a href="./exampleExpo/src/advanced-parallax/index.tsx">advanced-parallax</a> | <a href="./exampleExpo/src/pause-advanced-parallax/index.tsx">pause-advanced-parallax</a> | <a href="./exampleExpo/src/scale-fade-in-out/index.tsx">scale-fade-in-out</a> |
| <img src="assets/rotate-scale-fade-in-out.gif"/> | <img src="assets/rotate-in-out.gif"/> | <img src="assets/anim-tab-bar.gif"/> |
| <a href="./example/src/rotate-scale-fade-in-out/index.tsx">rotate-scale-fade-in-out</a> | <a href="./example/src/rotate-in-out/index.tsx">rotate-in-out</a> | <a href="./example/src/anim-tab-bar/index.tsx">anim-tab-bar</a> |
| <a href="./exampleExpo/src/rotate-scale-fade-in-out/index.tsx">rotate-scale-fade-in-out</a> | <a href="./exampleExpo/src/rotate-in-out/index.tsx">rotate-in-out</a> | <a href="./exampleExpo/src/anim-tab-bar/index.tsx">anim-tab-bar</a> |
| <img src="assets/marquee.gif"/> | <img src="assets/multiple.gif"/> | |
| <a href="./example/src/marquee/index.tsx">marquee</a> | <a href="./example/src/multiple/index.tsx">multiple</a> | |
| <a href="./exampleExpo/src/marquee/index.tsx">marquee</a> | <a href="./exampleExpo/src/multiple/index.tsx">multiple</a> | |
| <img src="assets/parallax-layers.gif"/> | <img src="assets/flow.gif"/> | |
| <a href="./example/src/parallax-layers/index.tsx">parallax-layers</a> | <a href="./example/src/flow/index.tsx">flow</a> | |
| <a href="./exampleExpo/src/parallax-layers/index.tsx">parallax-layers</a> | <a href="./exampleExpo/src/flow/index.tsx">flow</a> | |

## 目录

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here are a few examples.

### Parallax

<a href="../example/src/advanced-parallax/index.tsx">
<a href="../exampleExpo/src/advanced-parallax/index.tsx">
<img src="././../assets/advanced-parallax.gif" width="300"/>
</a>

Expand Down Expand Up @@ -101,7 +101,7 @@ In order to implement some animation effects outside `Carousel`, such as `MaskVi

### ScaleFadeInOut

<a href="../example/src/scale-fade-in-out/index.tsx">
<a href="../exampleExpo/src/scale-fade-in-out/index.tsx">
<img src="././../assets/scale-fade-in-out.gif" width="300"/>
</a>

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-animation.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type TAnimationStyle = (value: number) => Animated.AnimatedStyleProp<ViewStyle>;

### 视差效果

<a href="../example/src/advanced-parallax/index.tsx">
<a href="../exampleExpo/src/advanced-parallax/index.tsx">
<img src="././../assets/advanced-parallax.gif" width="300"/>
</a>

Expand Down Expand Up @@ -101,7 +101,7 @@ const CustomItem = ({ index, animationValue }) => {

### 缩放渐入渐出效果

<a href="../example/src/scale-fade-in-out/index.tsx">
<a href="../exampleExpo/src/scale-fade-in-out/index.tsx">
<img src="././../assets/scale-fade-in-out.gif" width="300"/>
</a>

Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"prepare": "bob build",
"release": "yarn prepare && release-it --no-git.requireUpstream",
"preRelease": "yarn prepare && release-it --no-git.requireUpstream --preRelease=beta",
"ios": "yarn --cwd example ios",
"ios:pretty": "yarn --cwd example ios:pretty",
"web": "yarn --cwd example web",
"web:pretty": "yarn --cwd example web:pretty",
"android": "yarn --cwd example android",
"android:pretty": "yarn --cwd example android:pretty",
"pods": "cd example && pod-install --quiet",
"ios": "yarn --cwd exampleExpo ios",
"ios:pretty": "yarn --cwd exampleExpo ios:pretty",
"web": "yarn --cwd exampleExpo web",
"web:pretty": "yarn --cwd exampleExpo web:pretty",
"android": "yarn --cwd exampleExpo android",
"android:pretty": "yarn --cwd exampleExpo android:pretty",
"pods": "cd exampleExpo && pod-install --quiet",
"bootstrap": "yarn && yarn pods",
"deploy": "cd example && yarn deploy"
"deploy": "cd exampleExpo && yarn deploy"
},
"keywords": [
"react-native",
Expand Down Expand Up @@ -92,6 +92,8 @@
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/exampleExpo/node_modules",
"<rootDir>/exampleBare/node_modules",
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
Expand Down

0 comments on commit 091830a

Please sign in to comment.