How to - woowacourse-teams/2020-zeze GitHub Wiki

Zeze

How to

Code Convention

๋‹ค์Œ ์ปจ๋ฒค์…˜์„ ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

IntelliJ Code Style ์„ค์ •

  • Editor > Code Style > Java ์—์„œ ๋‹ค์Œ์„ ์„ค์ •
    • Scheme > Import scheme > IntelliJ IDEA code scheme XML
    • (ํ”„๋กœ์ ํŠธ ์ตœ์ƒ๋‹จ) .zeze-java-convention.xml ์„ ํƒ
    • ์ด๋ฆ„์„ ์ž…๋ ฅํ•ด์•ผํ•˜๋Š” ๊ฒฝ์šฐ zeze-java-convention ์ž…๋ ฅ
    • Scheme์—์„œ zeze-java-convention ์„ ํƒ

CheckStyle (Java)

gradle

  • ./gradlew checkstyleMain
  • ./gradlew checkstyleTest

IntelliJ

  • Plugins์—์„œ CheckStyle-IDEA ์„ค์น˜
  • Tools > Checkstyle ์—์„œ ๋‹ค์Œ์„ ์„ค์ •
    • Checkstyle Version: 8.27 ์ด์ƒ (8.34 ๊ถŒ์žฅ)
    • Scan Scope: Only Java sources (including tests)
    • Configuration file ํ•˜๋‹จ + ๋ฒ„ํŠผ์œผ๋กœ XML ๋‹ค์Œ์„ ์ถ”๊ฐ€
      • Description: zeze-checkstyle
      • Use a local Checkstyle file ์ฒดํฌ ํ›„ Browse > (ํ”„๋กœ์ ํŠธ ์ตœ์ƒ๋‹จ) .zeze-checkstyle.xml ์„ ํƒ
    • Import ํ•œ CheckStyle ์ฒดํฌ ํ›„ apply

ESLint (TypeScript)

Yarn / NPM

  • cd client
  • (ํ™•์ธ๋งŒ ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด) yarn lint (๋˜๋Š” npm run lint)
  • (์ˆ˜์ • ๊ฐ€๋Šฅํ•œ ๋ถ€๋ถ„๋“ค์— ๋Œ€ํ•ด ์ž๋™ ์ˆ˜์ •์„ ์‹คํ–‰ํ•œ๋‹ค๋ฉด) yarn lint-fix (๋˜๋Š” npm run lint-fix)

IntelliJ

  • Plugins์—์„œ ESLint ์„ค์น˜
  • Language & Frameworks > JavaScript > Code Quality Tools > ESLint ์—์„œ ๋‹ค์Œ์„ ์„ค์ •
    • Automatic ESLint Configuration ์ฒดํฌ
    • (์ €์žฅํ•  ๋•Œ๋งˆ๋‹ค ์ž๋™ ์ˆ˜์ •์„ ์›ํ•œ๋‹ค๋ฉด) Run eslint --fix on save ์ฒดํฌ

Client Build (Server์™€ ์—ฐ๋™ ์—†์ด Client๋งŒ Buildํ•˜๋Š” ๊ฒฝ์šฐ)

  • cd client
  • yarn (๋˜๋Š” npm install)
  • yarn build
  • (serve๊ฐ€ ์„ค์น˜๋˜์–ด์žˆ์ง€ ์•Š์€ ๊ฒฝ์šฐ) yarn global add serve (๋˜๋Š” npm install -g serve)
  • serve -s build

Server Build

  • (Client ๋นŒ๋“œ ํ›„ Server์˜ resources/static์œผ๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒฝ์šฐ) ./gradlew buildClient
  • ./gradlew build
  • java -jar ./build/libs/zeze-0.0.1-SNAPSHOT.jar