From 091830a911a70b476e0c25ddcf821c9beb4d354d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=9D=B1=E6=BE=94?= Date: Thu, 16 Jun 2022 20:26:34 +0800 Subject: [PATCH] chore: Example info modified --- .github/workflows/main.yml | 4 ++-- .gitignore | 2 +- CONTRIBUTING.md | 18 +++++++++--------- README.md | 14 +++++++------- README.zh-CN.md | 14 +++++++------- docs/custom-animation.md | 4 ++-- docs/custom-animation.zh-CN.md | 4 ++-- package.json | 18 ++++++++++-------- 8 files changed, 40 insertions(+), 38 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 391260ab..90936287 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.gitignore b/.gitignore index 41f46343..446b0b37 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ android.iml # Cocoapods # -example/ios/Pods +exampleBare/ios/Pods # node.js # diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c29109c..d841de23 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: @@ -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 diff --git a/README.md b/README.md index 4104bfe1..e6b6c371 100644 --- a/README.md +++ b/README.md @@ -25,23 +25,23 @@ English | [简体中文](./README.zh-CN.md) | | | | | :--------------------------------------------------------------: | :---------------------------------------------------------------: | :----------------------------------------------------------------: | -| normal-horizontal | normal-vertical | parallax-horizontal | +| normal-horizontal | normal-vertical | parallax-horizontal | | | | | -| parallax-vertical | stack-horizontal-left | stack-horizontal-right | +| parallax-vertical | stack-horizontal-left | stack-horizontal-right | | | | | -| stack-vertical-left | stack-vertical-right | stack-horizontal-right | +| stack-vertical-left | stack-vertical-right | stack-horizontal-right | > Now you can make cool animations with us! Very easy! [[Details]](./docs/custom-animation.md) | | | | | :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------: | -| advanced-parallax | pause-advanced-parallax | scale-fade-in-out | +| advanced-parallax | pause-advanced-parallax | scale-fade-in-out | | | | | -| rotate-scale-fade-in-out | rotate-in-out | anim-tab-bar | +| rotate-scale-fade-in-out | rotate-in-out | anim-tab-bar | | | | | -| marquee | multiple | | +| marquee | multiple | | | | | | -| parallax-layers | flow | | +| parallax-layers | flow | | ## Table of contents diff --git a/README.zh-CN.md b/README.zh-CN.md index 953f14f2..fde53170 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -25,23 +25,23 @@ | | | | | :--------------------------------------------------------------: | :---------------------------------------------------------------: | :----------------------------------------------------------------: | -| normal-horizontal | normal-vertical | parallax-horizontal | +| normal-horizontal | normal-vertical | parallax-horizontal | | | | | -| parallax-vertical | stack-horizontal-left | stack-horizontal-right | +| parallax-vertical | stack-horizontal-left | stack-horizontal-right | | | | | -| stack-vertical-left | stack-vertical-right | stack-horizontal-right | +| stack-vertical-left | stack-vertical-right | stack-horizontal-right | > 现在你可以和我们一起来制作酷炫的动画了! 非常简单! [[详情]](./docs/custom-animation.zh-CN.md) | | | | | :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------: | -| advanced-parallax | pause-advanced-parallax | scale-fade-in-out | +| advanced-parallax | pause-advanced-parallax | scale-fade-in-out | | | | | -| rotate-scale-fade-in-out | rotate-in-out | anim-tab-bar | +| rotate-scale-fade-in-out | rotate-in-out | anim-tab-bar | | | | | -| marquee | multiple | | +| marquee | multiple | | | | | | -| parallax-layers | flow | | +| parallax-layers | flow | | ## 目录 diff --git a/docs/custom-animation.md b/docs/custom-animation.md index fc2cac5d..82f3031e 100644 --- a/docs/custom-animation.md +++ b/docs/custom-animation.md @@ -26,7 +26,7 @@ Here are a few examples. ### Parallax - + @@ -101,7 +101,7 @@ In order to implement some animation effects outside `Carousel`, such as `MaskVi ### ScaleFadeInOut - + diff --git a/docs/custom-animation.zh-CN.md b/docs/custom-animation.zh-CN.md index 570b495d..d50c75b3 100644 --- a/docs/custom-animation.zh-CN.md +++ b/docs/custom-animation.zh-CN.md @@ -26,7 +26,7 @@ type TAnimationStyle = (value: number) => Animated.AnimatedStyleProp; ### 视差效果 - + @@ -101,7 +101,7 @@ const CustomItem = ({ index, animationValue }) => { ### 缩放渐入渐出效果 - + diff --git a/package.json b/package.json index be3e530b..d643b3d4 100644 --- a/package.json +++ b/package.json @@ -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", @@ -92,6 +92,8 @@ "jest": { "preset": "react-native", "modulePathIgnorePatterns": [ + "/exampleExpo/node_modules", + "/exampleBare/node_modules", "/example/node_modules", "/lib/" ]