Skip to content

Commit

Permalink
chore: update expo preview
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Feb 23, 2024
1 parent be02a03 commit c6ee024
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 67 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ A configurable Mobile UI specification and React-based implementation.

- **Expo demo app**

|SDK 49+ iOS|SDK 49+ Android|
|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=91ccee3a-f631-4bdb-b643-e3d01b52a95c&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=49a4c02d-5dc0-47b9-a98f-61932a6d4765&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |

<details><summary>Expo SDK history version</summary>

|Expo SDK 44|SDK 47 iOS|SDK 47 Android|
|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |

</details>

> Open the camera app on your device and scan the code above, <br>
need install expo app: https://expo.io/tools
Expand Down
8 changes: 7 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ Ant Design 移动端设计规范。`@ant-design/react-native` 是 Ant Design 的

- **Expo demo app**

|SDK 49+ iOS|SDK 49+ Android|
|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=91ccee3a-f631-4bdb-b643-e3d01b52a95c&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=49a4c02d-5dc0-47b9-a98f-61932a6d4765&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |

<details><summary>Expo SDK历史版本</summary>

|Expo SDK 44|SDK 47 iOS|SDK 47 Android|
|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |

</details>

> 提示:使用本地原相机扫瞄上面的二维码, 需要下载 Expo App: https://expo.io/tools
Expand Down
3 changes: 2 additions & 1 deletion example/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import App from '@ant-design/react-native/rn-kitchen-sink/App'
import { useFonts } from 'expo-font'
import * as SplashScreen from 'expo-splash-screen'
import React, { useCallback } from 'react'
import { View } from 'react-native'
import 'react-native-gesture-handler'
import 'react-native-reanimated'
import App from '../rn-kitchen-sink/App'

SplashScreen.preventAutoHideAsync()

Expand Down
29 changes: 21 additions & 8 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,42 @@
"expo": {
"name": "@ant-design/react-native",
"slug": "ant-design-mobile-rn",
"version": "5.1.0",
"description": "基于蚂蚁金服移动设计规范的 React Native 组件库",
"sdkVersion": "49.0.0",
"icon": "../rn-kitchen-sink/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png",
"splash": {
"image": "../rn-kitchen-sink/ios/KitchenSink/Images.xcassets/AppIcon.appiconset/[email protected]"
},
"version": "5.0.3",
"entryPoint": "index.js",
"assetBundlePatterns": [
"**/*"
],
"experiments": {
"baseUrl": "https://1uokun.github.io/ant-design-mobile-rn/"
},
"web": {
"bundler": "metro"
"bundler": "metro",
"favicon": "./assets/favicon.png"
},
"ios": {
"bundler": "metro",
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "../rn-kitchen-sink/ios/KitchenSink/Images.xcassets/AppIcon.appiconset/[email protected]",
"backgroundColor": "#ffffff"
}
},
"extra": {
"eas": {
"projectId": "7729a68b-f881-4294-89f5-5ae751bfb2b2"
}
},
"runtimeVersion": {
"policy": "sdkVersion"
"policy": "appVersion"
},
"updates": {
"url": "https://u.expo.dev/7729a68b-f881-4294-89f5-5ae751bfb2b2"
},
"android": {},
"ios": {}
}
}
}
Binary file added example/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module.exports = function (api) {
api.cache(true)
return {
presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-proposal-export-namespace-from',
'react-native-reanimated/plugin',
],
presets: ['babel-preset-expo'],
}
}
26 changes: 13 additions & 13 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"export": "expo export",
"publish": "expo publish",
"build-web": "expo export -p web",
"publish": "eas update",
"prettify": "prettier --write . --config ./.prettierrc",
"lint": "eslint --ext js,ts,tsx ."
},
"dependencies": {
"@ant-design/icons-react-native": "^2.3.2",
"@ant-design/react-native": "*",
"expo": "49",
"expo-font": "~11.0.1",
"expo-splash-screen": "~0.17.4",
"expo-updates": "~0.15.6",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.8",
"@expo/metro-runtime": "~3.1.3",
"expo": "^50.0.3",
"expo-splash-screen": "~0.26.3",
"expo-status-bar": "~1.11.1",
"expo-updates": "~0.24.11",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.2",
"react-native-gesture-handler": "~2.12.0",
"react-native-reanimated": "~2.12.0"
"react-native-web": "~0.19.6",
"react-native-reanimated": "~3.6.2"
},
"devDependencies": {
"@expo/metro-runtime": "^2.2.15",
"babel-preset-expo": "~9.2.1"
"@babel/core": "^7.20.0"
}
}
4 changes: 0 additions & 4 deletions example/tsconfig.json

This file was deleted.

30 changes: 0 additions & 30 deletions example/webpack.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions rn-kitchen-sink/components/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint no-console:0 */
import React from 'react'
import { ScrollView, StyleSheet, View } from 'react-native'
import { Dimensions, ScrollView, StyleSheet, View } from 'react-native'
import { List, SearchBar } from '../../components'
import { OTHERS, UIBARS, UICONTROLS, UIVIEWS } from '../demoList'

const styles = StyleSheet.create({
container: {
flex: 1,
height: Dimensions.get('window').height,
},
})

Expand Down
2 changes: 1 addition & 1 deletion site/desktop/src/static/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
right: 40px;
width: 591px;
height: 407px;
background: url("https://gw.alipayobjects.com/zos/rmsportal/BYcmVgqmFmqHywEgcyVH.png") no-repeat center / cover;
background: url("https://gw.alipayobjects.com/zos/rmsportal/BYcmVgqmFmqHywEgcyVH.png?x-oss-process=image/resize,w_591/format,webp") no-repeat center / cover;
}
}

Expand Down
2 changes: 1 addition & 1 deletion site/desktop/src/static/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Ant Design Mobile | A Mobile Design Specification</title>
<link
rel="icon"
href="https://zos.alipayobjects.com/rmsportal/wIjMDnsrDoPPcIV.png"
href="https://zos.alipayobjects.com/rmsportal/wIjMDnsrDoPPcIV.png?x-oss-process=image/resize,h_32"
type="image/x-icon"
/>
{% if not isDev %}
Expand Down

0 comments on commit c6ee024

Please sign in to comment.