-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/scaffolding #2
Conversation
- Checkout - Set up Node - Install dependencies if those were not cached - Lint
๋น ๋จ๋ ธ๊ฑฐ๋ ์ ์ฉ ์๋ ๋ถ๋ถ์ด ์๋ค๋ฉด ์๋ ค์ฃผ์ญ์ผ ๐ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๐ ๐ ๐ ๐ ๐ ๊ณ ์ํ์ จ์ด์!
๐ฏ ๐ฅ
tsconfig.json
Outdated
"baseUrl": "./src", | ||
"paths": { | ||
"~/*": ["./*"], | ||
"@components/*": ["components/*"], | ||
"@screens/*": ["screens/*"], | ||
"@assets/*": ["assets/*"], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ๋ถ๋ถ ์น ํ๋ก์ ํธ ์ฒ๋ผ @/
์ผ๋ก ํต์ผํด๋ ์ข์ ๊ฑฐ ๊ฐ์ผ๋, ์ด๋๋ก ๊ฐ๋ ์ข์์!
package.json
Outdated
"postinstall": "husky install" | ||
}, | ||
"dependencies": { | ||
"@types/react-native-dotenv": "^0.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@types/react-native-dotenv": "^0.2.0", | |
devDependencies: { | |
... | |
"@types/react-native-dotenv": "^0.2.0", | |
... | |
} |
๊ฐ๋ฐ ์์กด์ฑ์ผ๋ก ์ฎ๊ฒจ๋ ๋ ๊ฑฐ ๊ฐ์์!
@@ -0,0 +1 @@ | |||
nodeLinker: node-modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ฏ
package.json
Outdated
"@types/react-native-dotenv": "^0.2.0", | ||
"react": "18.1.0", | ||
"react-native": "0.70.1", | ||
"react-native-dotenv": "^3.3.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ถ๊ฐ์ ์ผ๋ก react-native-webview
์ค์น ๋ถํ๋๋ฆฝ๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ถ๊ฐ์ ์ผ๋ก
react-native-webview
์ค์น ๋ถํ๋๋ฆฝ๋๋ค!
๋ต ํ์ฑ๋์ด ๋ฐฐํฌํ์ ๊ทธ ๋งํฌ๋ก ์ฐ์ ์ธํ ํด๋๊ฒ ์ต๋๋ค~!
- react-native-dotenv devDependency๋ก ์ด๋ - ์ ๋๊ฒฝ๋ก ์น ๋ฆฌํฌ์งํ ๋ฆฌ์ ํต์ผ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณ ์ํ์ จ์ด์!! ๐ ๐ฏ ๐ฅ ๐ ๐ฏ ๐ฅ ๐ ๐ฏ ๐ฅ
<SafeAreaView style={{ flex: 1 }}> | ||
<WebView source={{ uri: BASE_URL }} /> | ||
</SafeAreaView> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๐ ๐
๐ฅ React Native ์ธํ ๋ฐฉ๋ฒ
๋งฅ(Mac)์ react native ๊ฐ๋ฐ ํ๊ฒฝ ๊ตฌ์ถํ๊ธฐ
์ ๊ธ์์
react-native ํ๋ก์ ํธ ์์ฑ ๋ฐ ํ์ธ
์ ๊น์ง ์งํํด์ฃผ์๊ณ ์๋ ๋ช ๋ น์ด๋๋ก ํด์ฃผ์๋ฉด ๋ฉ๋๋ค!์๋๋ก์ด๋ ์๋ฎฌ๋ ์ดํฐ์ Xcode ์๋ฎฌ๋ ์ดํฐ์ React Native ์ด๊ธฐ ํ๋ฉด์ด ๋์ค๋ฉด ์ฑ๊ณต์ ๋๋ค๐๐ป ์ ๊ฐ ํด๋ดค์ ๋๋ ๋ฌธ์ ์์ด ์ ๋น๋๋๋๋ฐ, ์ ๋ ์ด๋ฏธ ์ปดํจํฐ์ RN ์ธํ ์ด ๋์ด์๋ ์ํ๋ผ์ ์ข ๋ค๋ฅผ ์๋ ์์ ๊ฒ ๊ฐ์ต๋๋ค. ์ ์๋๋ค๋ฉด ๋ฐ๋ก ์๋ ค์ฃผ์ธ์..
๐ฅ ์ค์บํด๋ฉ ๋ด์ฉ
๋ฏผ๊ท๋์ด ํด์ฃผ์ ์ค์บํด๋ฉ๊ณผ ์๊ฐํฑ RN ๋ ํฌ์งํ ๋ฆฌ๋ฅผ ์ฐธ๊ณ ํ์ต๋๋ค ๐ซ
React Native ์ธํ
yarn ๊ณต์ ์ฌ์ดํธ๋ฅผ ํ์ธํด๋ณด๋ฉด PlugโnโPlay install์ React Native์ incompatibleํ๋ค๊ณ ๋ช ์๋์ด ์๋๋ผ๊ตฌ์. ๊ทธ๋์ ์๋ด๋ ๋๋ก
node_modules
plugin์ ์ฌ์ฉํ์ต๋๋ค.yarn install ์ .yarn/cache๋ฅผ ์ฒดํฌํด์ node_modules ํด๋๋ฅผ ์์ฑํ๋ค๊ณ ํฉ๋๋ค. ์์กด์ฑ์ ์๋ก ๋ค์ด ๋ฐ๋ ๊ฑด ์๋๊ธฐ ๋๋ฌธ์ ์์ PnP์ ๋น๊ตํ์ ๋ ์๊ฐ ์ฐจ์ด๋ ํฌ์ง ์๋ค๊ณ ํฉ๋๋ค!
eslint
๋ฏผ๊ท๋ eslint์ ๋์ผํ๊ฒ ์ค์ ํ๋ NextJS ๊ด๋ จ ๋ถ๋ถ์ ์ ์ธํ๊ณ RN plugin ์ถ๊ฐํ์ต๋๋ค.
Husky
prettier์ ๊ฒฝ์ฐ lint-staged๋ก ํ ๋ฒ์ ์ ์ฉ ๊ฐ๋ฅํ๋ค๊ณ ํด์, ๋ณ๋๋ก ์ถ๊ฐํ์ง ์์์ต๋๋ค.
Github Actions
์ ๋๊ฒฝ๋ก(babel-plugin-module-resolver)
srcํด๋์ ํ์ ํด๋๋ค์
@ํด๋๋ช
์ผ๋ก ์ ๊ทผํ ์ ์๊ฒ ์ค์ ํด๋์์ต๋๋ค! ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ํด๋๋ค์ ๊ฒฝ๋ก๋ง ์ถ๊ฐํด๋ ์ํ๋ผ, ์ํ์๋ฉดbabel.config.js
ํ์ผ์์ ์ถ๊ฐํ์ค ์ ์์ต๋๋ค.etc
References
PnP compatibility table
react-native-community : yarn PnP ์ง์ ๊ด๋ จ issue
How to use Yarn 3 with React Native
Prettier: Pre-commit Hook