Skip to content

Commit d8dc866

Browse files
committed
initial commit for expo plugin
1 parent 63ea11e commit d8dc866

27 files changed

+29060
-19459
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Output of the build process & scripts
88
lib/**/*
9+
plugin/build/**/*
910
scripts/**/*
1011

1112
babel.config.js
@@ -14,3 +15,4 @@ react-native.config.js
1415
jest.config.js
1516
webpack.config.js
1617
.eslintrc.js
18+
app.plugin.js

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ android/generated
6969
example/android/libs
7070

7171
.kotlin/
72+
73+
# expo plugin build
74+
plugin/build/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CODE_OF_CONDUCT.md
66
.well-known
77
desktop/dist/**/*.js
88
dist/**/*.js
9+
plugin/build/**/*.js
910
assets/animations
1011
android
1112
ios

app.plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This file configures the entry file for your plugin.
2+
module.exports = require("./plugin/build");

example-expo/.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
.kotlin/
14+
*.orig.*
15+
*.jks
16+
*.p8
17+
*.p12
18+
*.key
19+
*.mobileprovision
20+
21+
# Metro
22+
.metro-health-check*
23+
24+
# debug
25+
npm-debug.*
26+
yarn-debug.*
27+
yarn-error.*
28+
29+
# macOS
30+
.DS_Store
31+
*.pem
32+
33+
# local env files
34+
.env*.local
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
app-example
40+
41+
# generated native folders
42+
/ios
43+
/android

example-expo/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Welcome to your Expo app 👋
2+
3+
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
4+
5+
## Get started
6+
7+
1. Install dependencies
8+
9+
```bash
10+
npm install
11+
```
12+
13+
2. Start the app
14+
15+
```bash
16+
npx expo start
17+
```
18+
19+
In the output, you'll find options to open the app in a
20+
21+
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22+
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23+
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24+
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
25+
26+
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
27+
28+
## Get a fresh project
29+
30+
When you're ready, run:
31+
32+
```bash
33+
npm run reset-project
34+
```
35+
36+
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
37+
38+
## Learn more
39+
40+
To learn more about developing your project with Expo, look at the following resources:
41+
42+
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
43+
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
44+
45+
## Join the community
46+
47+
Join our community of developers creating universal apps.
48+
49+
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
50+
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.

example-expo/app.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"expo": {
3+
"name": "example-expo",
4+
"slug": "example-expo",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "exampleexpo",
9+
"userInterfaceStyle": "automatic",
10+
"newArchEnabled": true,
11+
"ios": {
12+
"supportsTablet": true,
13+
"bundleIdentifier": "com.wcastand.exampleexpo"
14+
},
15+
"android": {
16+
"adaptiveIcon": {
17+
"backgroundColor": "#E6F4FE",
18+
"foregroundImage": "./assets/images/android-icon-foreground.png",
19+
"backgroundImage": "./assets/images/android-icon-background.png",
20+
"monochromeImage": "./assets/images/android-icon-monochrome.png"
21+
},
22+
"edgeToEdgeEnabled": true,
23+
"predictiveBackGestureEnabled": false,
24+
"package": "com.wcastand.exampleexpo"
25+
},
26+
"web": {
27+
"output": "static",
28+
"favicon": "./assets/images/favicon.png"
29+
},
30+
"plugins": [
31+
"expo-router",
32+
[
33+
"expo-splash-screen",
34+
{
35+
"image": "./assets/images/splash-icon.png",
36+
"imageWidth": 200,
37+
"resizeMode": "contain",
38+
"backgroundColor": "#ffffff",
39+
"dark": {
40+
"backgroundColor": "#000000"
41+
}
42+
}
43+
],
44+
[
45+
"../app.plugin.js",
46+
{
47+
"enableApplePayProvisioning": true,
48+
"googleTapAndPaySdkPath": "./libs/tapandpay-v18.7.0.zip"
49+
}
50+
]
51+
],
52+
"experiments": {
53+
"typedRoutes": true,
54+
"reactCompiler": true
55+
}
56+
}
57+
}

example-expo/app/_layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import {Stack} from 'expo-router';
2+
3+
export default function RootLayout() {
4+
return <Stack />;
5+
}

example-expo/app/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {Text, View} from 'react-native';
2+
3+
export default function Index() {
4+
return (
5+
<View
6+
style={{
7+
flex: 1,
8+
justifyContent: 'center',
9+
alignItems: 'center',
10+
}}
11+
>
12+
<Text>Edit app/index.tsx to edit this screen.</Text>
13+
</View>
14+
);
15+
}
17.1 KB
Loading

0 commit comments

Comments
 (0)