์žฌ๋ฐŒ๊ฒŒ ํ•ฉ์‹œ๋‹ค

๊ธฐ๋กํ•˜๊ธฐ, ๊ฐ€์‹œํ™”ํ•˜๊ธฐ

React

ํ”„๋กœ์ ํŠธ ์Šค์บํด๋”ฉ ๊ธฐ๋ก ๐Ÿ“ธ

์€๋˜๋”” 2022. 10. 18. 01:33

์ฒซ ๋ฒˆ์งธ, ์ดˆ๊ธฐ ํ”„๋กœ์ ํŠธ์˜ ๋ผˆ๋Œ€๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๋Š” ํ–‰์œ„๋ฅผ ๋œปํ•œ๋‹ค. ์–ด๋–ค ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•  ๋•Œ ๊ธฐ๋ณธ์ ์ธ README, License๋ฅผ ๋น„๋กฏํ•˜์—ฌ ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ, ์ปดํŒŒ์ผ ์„ค์ • ๋“ฑ์ด ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•˜๋Š” CLI ํ˜น์€ UI ๋„๊ตฌ๊ฐ€ ์ด์™€ ๊ฐ™๋‹ค.
์ถœ์ฒ˜: ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์šฉ์–ด์‚ฌ์ „

 

์šฐ๋ฆฌ๋Š” React Native ๋‚ด์—์„œ Next.js๋กœ ์›น๋ทฐ๋ฅผ ๋„์šฐ๊ธฐ๋กœ ํ–ˆ๋‹ค. ๊ทธ๋ž˜์„œ Next.js ๋ ˆํผ์ง€ํ† ๋ฆฌ์™€ React Native ๋ ˆํผ์ง€ํ† ๋ฆฌ ๋‘ ๊ฐœ๊ฐ€ ํ•„์š”ํ–ˆ๋‹ค. ๋‚œ ๊ทธ ์ค‘ RN ๋ ˆํผ์ง€ํ† ๋ฆฌ์˜ ์Šค์บํด๋”ฉ์„ ๋‹ด๋‹นํ–ˆ๋‹ค!๐Ÿ™‹๐Ÿป‍โ™€๏ธ ๋””ํ”„๋งŒ ์ด์ „ ๊ธฐ์ˆ˜์˜ RN ๋ ˆํผ์ง€ํ† ๋ฆฌ์™€, ๋‹ค๋ฅธ ํŒ€์› ๋ถ„์ด ๋๋‚ด๋†“์œผ์‹  ์›น ๋ ˆํผ์ง€ํ† ๋ฆฌ๋ฅผ ์ฐธ๊ณ ํ–ˆ๋‹ค. ๋‹ค๋ฅธ ํŒ€์›๋“ค์ด clone์„ ๋ฐ›์•˜์„ ๋•Œ๋„ ๋ฌธ์ œ์—†์ด ์ž‘๋™ํ•ด์•ผ ํ•œ๋‹ค๋Š” ์ , ์ฐธ๊ณ ํ•œ ๋ ˆํผ์ง€ํ† ๋ฆฌ์— ์ถ”๊ฐ€๋˜์–ด ์žˆ๋Š” ๊ฐ์ข… ํˆด๋“ค(ํŒจํ‚ค์ง€๋“ค)์„ ์ง์ ‘ ์‚ฌ์šฉํ•ด๋ณธ ์ ์ด ์—†๋‹ค๋Š” ์ ์ด ์–ด๋ ค์› ๋‹ค. ๋˜ ๊ฐœ๋ณ„ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์„ธํŒ…ํ•˜๋Š” ๊ฒŒ ์–ด๋ ค์› ๋‹ค๊ธฐ ๋ณด๋‹ค๋Š”, ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค ๊ฐ„์˜ ์„ ํ›„๊ด€๊ณ„๋ฅผ ํŒŒ์•…ํ•˜๋Š” ๊ฒŒ ์–ด๋ ค์› ๋‹ค.

๋ฌดํ•œ ๊ตฌ๊ธ€๋ง์˜ ํ”์ 

๐Ÿ’๐Ÿป‍โ™‚๏ธ ๋‚ด๊ฐ€ ํ•œ ๊ฒƒ๋“ค

  • Yarn Berry ์„ค์ •
  • React Native ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ, ios/aos ๋นŒ๋“œ
  • eslint์™€ ๊ฐ์ข… eslint ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜
  • husky
    • commitlint
    • lint-staged
  • github actions๋กœ CI ๊ตฌ์ถ•
  • Reviewer, Assigness ์ž๋™ ํ• ๋‹น
  • CODEOWNERS ์ถ”๊ฐ€
  • PR ํ…œํ”Œ๋ฆฟ ์ถ”๊ฐ€
  • dotenv ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๊ฒŒ ์„ธํŒ…: .env ํŒŒ์ผ ๋‚ด ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋ฐ”๋กœ importํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค.
  • ์ ˆ๋Œ€๊ฒฝ๋กœ ์„ค์ •: alias๋ฅผ ์‚ฌ์šฉํ•ด ๊ธธ์–ด์ง€๋Š” ์ƒ๋Œ€๊ฒฝ๋กœ๋ฅผ ์งง๊ฒŒ ๋ฐ”๊พผ๋‹ค.

์ƒˆ๋กœ ์ ‘ํ•ด๋ณธ ๊ฒƒ๋“ค์ด ๋Œ€๋ถ€๋ถ„์ธ๋ฐ ์„ธํŒ…์„ ํ•˜๋ ค๋‹ˆ ์‰ฝ์ง€ ์•Š์•˜๋‹ค.. ๊ตต์งํ•œ ๊ฒƒ๋“ค๋งŒ ๊ฐ„๋‹จํžˆ ๊ธฐ๋กํ•ด๋ณด์ž.

 

Yarn Berry + React Native ์„ธํŒ…

์•„๋ž˜ ํฌ์ŠคํŒ…์— ์ž์„ธํžˆ ์ •๋ฆฌํ•ด๋†“์•˜๋‹ค.

https://meoweundi.tistory.com/35

 

Yarn Berry๋กœ React Native ํ”„๋กœ์ ํŠธ ์‹œ์ž‘ํ•˜๊ธฐ

Yarn Berry๋กœ React Native ํ”„๋กœ์ ํŠธ๋ฅผ ๊ด€๋ฆฌํ•ด๋ณด์ž. https://dev-yakuza.posstree.com/ko/react-native/install-on-mac/ ๋งฅ(Mac)์— react native ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ react-native๋กœ ์•ฑ์„ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•ด ๋งฅ(Mac)์— ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์„ ๊ตฌ์ถ•

meoweundi.tistory.com

CI ๊ตฌ์ถ•(Github Actions)

https://meoweundi.tistory.com/34

 

Github Actions๋กœ CI ์ ์šฉํ•˜๊ธฐ(๊ทน ์ดˆ๋ณด์ž์šฉ๐Ÿ˜ˆ), Github Actions ์ž‘๋™ ํ™•์ธํ•˜๋Š” ๋ฒ•

์ด๊ฑฐ ๋ณด์‹ญ์‹œ์˜ค!!! ์ œ๊ฐ€ ๋ฉ‹์ง„ ๊ฒƒ์„ ํ•ด๋ƒˆ์Šต๋‹ˆ๋‹ค!!! ํฌํฌ ๋ฟŒ๋“ฏโœŒ๐Ÿป์ด๋Ÿฐ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ž‘์„ฑํ•ด๋ณธ ๊ฒŒ ์ฒ˜์Œ์ด๋ผ ๋งŽ์ด ํ—ค๋งธ๋‹ค. ๋‚˜๊ฐ™์€ ์ดˆ๋ณด์ž๋“ค์ด ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๊ฒŒ ์ž‘์„ฑํ•ด๋ณด๊ฒ ๋‹ค. ๐Ÿ’๐Ÿป‍โ™‚๏ธ Github Actions๋ž€?

meoweundi.tistory.com

eslint ๊ด€๋ จ

https://meoweundi.tistory.com/36

 

eslint ํ”Œ๋Ÿฌ๊ทธ์ธ ์ข…๋ฅ˜, ์ด ์ •๋ฆฌ

ํ”„๋กœ์ ํŠธ ์Šค์บํด๋”ฉ ์ค‘ ์ˆ˜๋งŽ์€ eslint ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๋งˆ์ฃผํ•˜๊ฒŒ ๋œ ๋‚˜.. ์ผ์ผ์ด ๊ตฌ๊ธ€๋งํ•˜๋Š๋ผ ๊ณ ์ƒํ–ˆ์–ด์„œ, ํ˜น์‹œ ๋‚˜๊ฐ™์€ ์‚ฌ๋žŒ์ด ์žˆ์„๊นŒ ์ •๋ฆฌํ•ด๋ด„!๐Ÿ˜‡ ํŒจํ‚ค์ง€๋“ค์„ ๋ช‡ ๊ฐ€์ง€๋กœ ๋ถ„๋ฅ˜ํ•ด๋’€์œผ๋‹ˆ, ์•„๋ž˜ ๋ถ„๋ฅ˜๋กœ

meoweundi.tistory.com

Git hook(Husky)

https://meoweundi.tistory.com/m/37

 

Husky๋กœ Git hooks ์ž๋™ํ™”ํ•˜๊ธฐ(+ lint-staged, commitlint)

Git hooks๋ž€? ํŠน์ • git ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๋•Œ ํŠน์ • ๋™์ž‘์„ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ ์˜ˆ) commit ์‹œ์— ์ž๋™์œผ๋กœ lint๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ Husky๋ž€? ์†์‰ฌ์šด Git Hook ์ ์šฉ์„ ์œ„ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ Husky์™€ Github Actions์˜ ์ฐจ์ด Husky: ๋กœ์ปฌ์—

meoweundi.tistory.com

 

์ƒˆ๋ผ๊ธ€์„ ๊ณ„์† ์ž‘์„ฑํ•˜๋ ค๋‹ˆ ํฌ์ŠคํŒ…์ด ๋งˆ๋ฌด๋ฆฌ๊ฐ€ ์•ˆ๋œ๋‹ค.. ์ด์ฏค์—์„œ ๋งˆ๋ฌด๋ฆฌํ•˜๊ณ , ๊ฐœ๋ณ„ ์„ธํŒ…์— ๋Œ€ํ•ด ํฌ์ŠคํŒ…์„ ๋” ์ž‘์„ฑํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด ๋งํฌ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฒ ๋‹ค!