react native + expo 프로잭트

This commit is contained in:
devhong 2025-07-29 17:27:56 +09:00
commit 2c825c9cc9
17 changed files with 8349 additions and 0 deletions

1
.devcontainer/.env Normal file
View File

@ -0,0 +1 @@
REACT_NATIVE_PACKAGER_HOSTNAME=10.10.90.162

View File

@ -0,0 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8081],
"initializeCommand": "bash .devcontainer/initializeCommand.sh",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash .devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"runArgs": ["-p=8081:8081", "--env-file", ".devcontainer/.env"]
}

View File

@ -0,0 +1,24 @@
#!/bin/bash
echo "Gathering you ip for dev container"
##############################################################################################
# en (Ethernet) - ib (InfiniBand) - sl (Serial line IP (slip)) - wl (Wireless local area network (WLAN)) - ww (Wireless wide area network (WWAN))
#############################################################################################
your_interface_name="eno"
interface_prefix="en" # Choose the interface network.
# OS 확인
OS=$(uname)
if [[ "$OS" == "Darwin" ]]; then
# macOS의 경우 ifconfig를 사용하여 인터페이스명 추출
#iname=$(ifconfig | awk -v p="$interface_prefix" '/^[a-z0-9]+: / {gsub(":", "", $1); if($1 ~ "^"p) print $1}' | head -n1)
iname='en0'
ip=$(ifconfig "$iname" | awk '/inet /{print $2}' | head -n1)
else
# Linux의 경우 기존 ip 명령어 사용
iname=$(ip -o link show | sed -rn "/^[0-9]+: $interface_prefix/{s/.: ([^:]*):.*/\1/p}" | head -n1)
ip=$(ifconfig "$iname" | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | sed 's/inet //g' | head -n1)
fi
echo "REACT_NATIVE_PACKAGER_HOSTNAME=$ip" > .devcontainer/.env

View File

@ -0,0 +1,13 @@
echo -e "\nStarting post creat command script..."
echo "Dev machine:"
uname -a
echo -e "\nInstalling expo boiler plate..."
npm install --save-dev -y create-expo-app@2.1.1
echo -e "\nInstalling watchman...\n"
sudo apt update
sudo apt install watchman
watchman version
echo -e "\n*******************************"
echo -e "\nDev container ready!".
echo -e "\n*******************************\n"

18
.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# expo
.expo/
# dependencies
/node_modules
# misc
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

37
myapp/.gitignore vendored Normal file
View File

@ -0,0 +1,37 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
expo-env.d.ts
# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo

20
myapp/App.js Normal file
View File

@ -0,0 +1,20 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});

29
myapp/app.json Normal file
View File

@ -0,0 +1,29 @@
{
"expo": {
"name": "myapp",
"slug": "myapp",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
myapp/assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
myapp/assets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

8
myapp/index.js Normal file
View File

@ -0,0 +1,8 @@
import { registerRootComponent } from 'expo';
import App from './App';
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);

8126
myapp/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
myapp/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "myapp",
"license": "0BSD",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~53.0.20",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-native": "0.79.5"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}

22
package-lock.json generated Normal file
View File

@ -0,0 +1,22 @@
{
"name": "expo",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {
"create-expo-app": "^2.1.1"
}
},
"node_modules/create-expo-app": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/create-expo-app/-/create-expo-app-2.1.1.tgz",
"integrity": "sha512-496ni62oVlqfmo5xagoLvt689uPLgHGxHh18a8A9pnbLw6gUemp2z/07LkJt5Mv1lT9BDsbMoVqf0wjdqoRIEw==",
"dev": true,
"license": "BSD-3-Clause",
"bin": {
"create-expo-app": "build/index.js"
}
}
}
}

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"devDependencies": {
"create-expo-app": "^2.1.1"
}
}