๐Ÿ“ฆ Monorepo Tutorial

Monorepo์— ๋Œ€ํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•œ ๊ธ€์ด๋‹ค.

๐Ÿ“ฆ Monorepo?

์—ฌ๋Ÿฌ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋‹ค ๋ณด๋ฉด ๋™์ผํ•œ ๋ชจ๋“ˆ์„ ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์—๋„ ๊ฐ™์ด ์‚ฌ์šฉํ•ด์•ผ ๋  ๊ฒฝ์šฐ๊ฐ€ ์ƒ๊ธด๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด backend์—์„œ admin ๊ณผ ์‹ค์ œ ์„œ๋น„์Šค ํ”„๋กœ์ ํŠธ ๊ฐ„์˜ ๋ชจ๋ธ, ๋„๋ฉ”์ธ ๋น„์ง€๋‹ˆ์Šค ๋กœ์ง์— ๋Œ€ํ•œ ์ฝ”๋“œ๋‚˜ ํ˜น์€ react์™€ react-native ์‚ฌ์ด์˜ ์ปดํฌ๋„ŒํŠธ ๊ณต์œ  ๋“ฑ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์ผ€์ด์Šค๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋ชจ๋“ˆ์„ ๊ณต์œ ํ•ด์•ผ๋˜๋Š” ์ƒํ™ฉ์—์„œ ์ค‘๋ณต๋˜๋Š” ๋ชจ๋“ˆ๋งˆ๋‹ค ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ๋ถ„๋ฆฌํ•ด์„œ ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์— ๋“ฑ๋กํ•˜๊ณ  ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด ๊ฐœ๋ฐœ, ํ…Œ์ŠคํŠธ, ๋ฐฐํฌ ์— ์žˆ์–ด์„œ ๊ด€๋ฆฌํ•˜๊ธฐ๊ฐ€ ์–ด๋ ค์›Œ์ง„๋‹ค. ๋ชจ๋…ธ๋ฆฌํฌ๋Š” ํ•˜๋‚˜์˜ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ์—ฌ๋Ÿฌ ํŒจํ‚ค์ง€๋“ค์„ ๋‘๋Š” ๊ตฌ์กฐ์ด๋‹ค.

Monorepo ์žฅ์ 

  • test, build, release ํ”„๋กœ์„ธ์Šค๋ฅผ ํ•œ ๋ฒˆ์— ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ํ•˜๋‚˜์˜ ์ €์žฅ์†Œ์—์„œ issue๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ๋ชจ๋“ˆ๋ณ„๋กœ ๊ฐœ๋ณ„์ ์ธ ๋ฒ„์ „๊ด€๋ฆฌ
  • ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์— ๋“ฑ๋กํ•˜์ง€ ์•Š๊ณ ๋„ ์ฝ”๋“œ๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ์‰ฌ์›Œ์ง„๋‹ค.

Monorepo ๋‹จ์ 

  • ๋Ÿฌ๋‹์ปค๋ธŒ ์™€ ์ดˆ๊ธฐ์…‹ํŒ…
  • ์ปค์ง„ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ์‚ฌ์ด์ฆˆ?

์ด๊ฒƒ ๋ง๊ณ ๋„ ๋ชจ๋…ธ๋ฆฌํฌ๋กœ ๊ตฌ์„ฑํ•ด์„œ ์ข€ ๋” ๋ฒˆ๊ฑฐ๋กœ์›Œ ์ง€๋Š” ๋ถ€๋ถ„๋“ค๋„ ์žˆ๊ฒ ์ง€๋งŒ ์ข€ ๋” ์‚ฌ์šฉํ•ด๋ด์•ผ ํ•  ๊ฒƒ ๊ฐ™๋‹ค.

Monorepo๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•

๋ชจ๋…ธ๋ฆฌํฌ๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ๊ตฌ์„ฑํ•œ๋Š” ํ˜•์‹์ด๊ธฐ ๋•Œ๋ฌธ์— ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋„๊ตฌ๋ฅผ ํ†ตํ•ด์„œ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ณ„๋‹ค๋ฅธ ๋„๊ตฌ ์—†์ด๋„ ํ•˜๋‚˜์˜ ๋ฆฌํฌ์•ˆ์— ํด๋”๋ฅผ ๊ตฌ๋ถ„ํ•˜๊ณ  node_module๊ฐ„์˜ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ํ†ตํ•ด์„œ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๊ฒ ์ง€๋งŒ ๋งค๋ฒˆ ๋งํฌ๋ฅผ ๊ฑฐ๋Š” ๋ฐฉ๋ฒ•์€ ๋น„ํšจ์œจ์ ์ด๊ณ  ๋ฒˆ๊ฑฐ๋กญ๋‹ค. ์—ฌ๊ธฐ์„  ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ธ Yarn workspace ์™€ Lerna ์— ๋Œ€ํ•ด ๊ฐ„๋‹จํžˆ ์†Œ๊ฐœํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค.

Yarn workspace

yarn workspace๋Š” ํŒจํ‚ค์ง€ ์•„ํ‚คํ…์ณ๋ฅผ ์„ค์ •ํ•˜๋Š” ์ƒˆ๋กœ์šด ๋ฐฉ๋ฒ•์ด๊ณ  ๊ธฐ๋ณธ์ ์œผ๋กœ 1.0๋ฒ„์ „๋ถ€ํ„ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค. yarn workspace๋ฅผ ์ด์šฉํ•˜๋ฉด ์ข€ ๋” ์‰ฝ๊ฒŒ ๋ชจ๋…ธ๋ฆฌํฌ ์•ˆ์— ์—ฌ๋Ÿฌ ํŒจํ‚ค์ง€๋“ค์˜ ์˜์กด์„ฑ์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. root ํด๋”์™€ ํŒจํ‚ค์ง€๋“ค๋กœ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ๋ชจ๋“  ํŒจํ‚ค์ง€๋“ค์— ๋Œ€ํ•œ ์˜์กด์„ฑ์„ ํ•œ๋ฒˆ์˜ yarn install ๋กœ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜ํ•œ ๋ชจ๋“ˆ์€ hoist ๋˜์–ด์„œ root ํด๋”์˜ node_modules ํด๋”์— ์„ค์น˜๋œ๋‹ค. ๋ฌผ๋ก  ๊ณตํ†ต๋œ ๋ชจ๋“ˆ์ธ๋ฐ ๋ฒ„์ „๋งŒ ๋‹ค๋ฅผ ๊ฒฝ์šฐ์—” ํ•ด๋‹น ํŒจํ‚ค์ง€ node_modules์— ์„ค์น˜๋œ๋‹ค.

์•„๋ž˜ ํŠœํ† ๋ฆฌ์–ผ์„ ๋”ฐ๋ผํ•ด๋ณด๋ฉด ์–ด๋–ค์‹์œผ๋กœ ๋™์ž‘ํ•˜๋Š”์ง€ ์ข€ ๋” ์‰ฝ๊ฒŒ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋‹ค.

Repo Structure

๊ตฌ์„ฑํ•ด๋ณด๋ ค๊ณ  ํ•˜๋Š” ๋ชจ๋…ธ๋ฆฌํฌ์˜ ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. ๋ณดํ†ต packages๋ผ๋Š” ํด๋” ์•„๋ž˜ ํŒจํ‚ค์ง€๋“ค์„ ๋ชจ์•„์„œ ๊ด€๋ฆฌํ•˜์ง€๋งŒ ๋‹ค๋ฅธ์ด๋ฆ„์œผ๋กœ ๋ฐ”๊ฟ”๋„ ๋ฌด๊ด€ํ•˜๋‹ค.

1
2
3
4
5
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ packages
โ”œโ”€โ”€ server
โ”œโ”€โ”€ shared
โ””โ”€โ”€ web

root package.json ์ž‘์„ฑ

root directory๋Š” ํŒจํ‚ค์ง€๋กœ ๋ฐฐํฌ๋ ๋ฆฌ ์—†๊ธฐ ๋•Œ๋ฌธ์— private์œผ๋กœ ์„ค์ •ํ•˜๊ณ  workspaces์—๋Š” ํŒจํ‚ค์ง€ ํด๋”๋ช…์„ ๋ฐฐ์—ด๋กœ ๋„˜๊ธธ ์ˆ˜ ์žˆ๋‹ค. ํŒจํ„ด๋„ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

yarn init ํ›„ ์•„๋ž˜ property๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

1
2
3
4
5
6
{
"private": true,
"workspaces": [
"packages/*"
]
}

ํŒจํ‚ค์ง€๋ณ„ package.json ์ƒ์„ฑ

1
2
3
cd packages/shared && yarn init -y
cd packages/server && yarn init -y
cd packages/web && yarn init -y

ํŒจํ‚ค์ง€๋ช… ๋ณ€๊ฒฝ

package.json ์ด ์ƒ๊ฒผ์ง€๋งŒ npm ์—์„œ ๋”ฐ๋กœ ์„ค์น˜ํ•œ ๋ชจ๋“ˆ๊ณผ ๊ตฌ๋ถ„ํ•ด์ฃผ๊ธฐ ์œ„ํ•ด์„œ ์•ž์— prefix๋ฅผ ๋ถ™์—ฌ์ฃผ๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. ์—ฌ๊ธฐ์„  ์˜ˆ์‹œ๋กœ @project๋กœ ์„ค์ •ํ•˜์˜€๋‹ค.

1
2
3
4
5
6
{
"name": "@project/server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT"
}

yarn install

root ํด๋”๋กœ ์ด๋™ํ›„ yarn install ์„ ํ•˜๋ฉด node_modules์— ํŒจํ‚ค์ง€๋“ค์ด ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๊ฐ€ ์ž๋™์œผ๋กœ ๊ฑธ๋ ค์žˆ๋‹ค. ์ด๊ฑธํ†ตํ•ด์„œ ํŒจํ‚ค์ง€๊ฐ„์— ๋ชจ๋“ˆ ์ƒํ˜ธ์ฐธ์กฐ๊ฐ€ ๊ฐ€๋Šฅํ•ด์ง„๋‹ค.

1
2
3
4
โ””โ”€โ”€ @project
โ”œโ”€โ”€ server -> ../../packages/server
โ”œโ”€โ”€ shared -> ../../packages/shared
โ””โ”€โ”€ web -> ../../packages/web

๊ฐ„๋‹จํ•œ ์ฝ”๋“œ ์ž‘์„ฑ

shared ํŒจํ‚ค์ง€์— ์–ด๋–คํ•จ์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  serverํŒจํ‚ค์ง€์—์„œ shared๋ชจ๋“ˆ์„ ์ฐธ์กฐํ•ด์„œ ์‚ฌ์šฉํ•˜๋Š” ์˜ˆ์‹œ์ด๋‹ค.

packages/shared/index.js

1
2
3
module.exports = () => {
console.log('Hello Shared!');
};

shared ๋ชจ๋“ˆ์„ ๋กœ๋”ฉํ•˜๊ธฐ์ „์— serverํŒจํ‚ค์ง€์— shared๋ฅผ ์˜์กด์„ฑ์œผ๋กœ ์ถ”๊ฐ€ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

(์ˆ˜๋™์œผ๋กœ ์ถ”๊ฐ€ํ•ด๋„ ๋ฌด๋ฐฉํ•˜๋‹ค.)

1
yarn workspace @project/server add @project/shared@1.0.0

packages/server/index.js

1
2
const sharedFunc = require('@project/shared');
sharedFunc();

server/index.js ์‹คํ–‰

1
node packages/server/index

npm ๋ชจ๋“ˆ ์ถ”๊ฐ€ (hoist)

packages/server/package.json

1
2
3
4
5
6
"dependencies": {
"@project/shared": "1.0.0",
"axios": "^0.19.0",
"jest": "^24.8.0",
"query-string": "^6.7.0"
}

packages/web/package.json ,
packages/shared/package.json

1
2
3
4
5
"dependencies": {
"query-string": "^6.7.0",
"jest": "24.0.0",
"axios": "0.18.0"
}

๋ชจ๋“ˆ์„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ถ”๊ฐ€ํ•œ ํ›„ root์—์„œ yarn install ์„ ํ•˜๋ฉด ํŒจํ‚ค์ง€๋ณ„๋กœ ๊ณตํ†ต๋œ ๋ชจ๋“ˆ์— ๊ฐ™์€ ๋ฒ„์ „์ด๋ผ๋ฉด hoist๋˜์–ด์„œ root ํด๋”์— node_modules์— ์„ค์น˜๋œ๋‹ค. ๋ฒ„์ „์ด ๋‹ค๋ฅด๋‹ค๋ฉด ํŒจํ‚ค์ง€์•„๋ž˜ node_modules๊ฐ€ ์‚ฌ์šฉ๋  ๊ฒƒ์ด๋‹ค. ๋งŒ์•ฝ hosit๋ฅผ ๊ธฐ๋Šฅ์œผ๋กœ ์ธํ•ด ๊ฒฝ๋กœ์ƒ์˜ ๋ฌธ์ œ๋‚˜ ๋‹ค๋ฅธ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋ฉด nohoist ์˜ต์…˜์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์„ค๋ช…์€ ์•„๋ž˜ ์ฐธ์กฐ ๋งํฌ๋ฅผ ๋‚จ๊ฒจ๋‘์—ˆ๋‹ค.

Lerna

Lerna๋Š” ๋ชจ๋…ธ๋ฆฌํฌ์˜ workflow๋ฅผ ์ตœ์ ํ™” ์‹œ์ผœ์ฃผ๋Š” ํˆด์ด๋‹ค. ์—ฌ๊ธฐ์„œ ๋งํ•˜๋Š” workflow๋ž€ test, build, versioning, publishing ๋“ฑ๊ณผ ๊ฐ™์€ ํ™œ๋™๋“ค์„ ๋œปํ•œ๋‹ค. ๋ฌผ๋ก  ๋ชจ๋…ธ๋ฆฌํฌ์•ˆ์— ์—ฌ๋Ÿฌ ํŒจํ‚ค์ง€๊ฐ„์˜ ์˜์กด์„ฑ์„ ๊ด€๋ฆฌํ•ด์ฃผ๋Š” ์ผ๋„ ํ•˜๊ณ  ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ตœ๊ทผ์—๋Š” ์˜์กด์„ฑ๊ด€๋ฆฌ ์™€ ๊ฐ™์€ ๊ธฐ๋Šฅ์€ yarn workspace์— ์œ„์ž„ํ•˜์—ฌ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๋Š” ์ถ”์„ธ์ธ ๊ฒƒ ๊ฐ™๋‹ค.

์ด ๊ธ€์—์„  yarn workspace์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์„ ๋งŒ๋“ค์–ด๋ณด์—ˆ๋‹ค.

์œ„์—์„œ ๊ตฌ์„ฑํ•ด๋†“์€ yarn workspace์— lerna๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

lerna๋Š” root์— ์„ค์น˜ํ•ด์•ผํ•˜๋ฏ€๋กœ -W ์˜ต์…˜์„ ๋ถ™์—ฌ์„œ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

1
yarn add -W -D lerna

lerna ์„ค์ •ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ค€๋‹ค.

1
npx lerna init

yarn workspace์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด lerna.jsonํŒŒ์ผ์„ ์ˆ˜์ •ํ•œ๋‹ค.

1
2
3
4
5
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "0.0.0"
}

๋ชจ๋“  ํŒจํ‚ค์ง€์— test scripts๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

ํ•ด๋‹น ์Šคํฌ๋ฆฝํŠธ๋Š” ๋‹จ์ˆœํžˆ ์ฝ˜์†”์— ํŒจํ‚ค์ง€๋ช…์„ ์ถœ๋ ฅํ•ด์ค€๋‹ค.

1
2
3
"scripts": {
"test": "echo test $npm_package_name"
}

lerna run command๋ฅผ ํ†ตํ•ด์„œ ํŒจํ‚ค์ง€์˜ script๋ฅผ ์‹คํ–‰์‹œํ‚จ๋‹ค.

1
npx lerna run test

์ถœ๋ ฅ๊ฒฐ๊ณผ

1
2
3
test @project/web
test @project/shared
test @project/server

โ€”scope ์˜ต์…˜์„ ํ†ตํ•ด์„œ ํŠน์ • ํŒจํ‚ค์ง€๋งŒ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ๋„ ๊ฐ€๋Šฅํ•˜๋‹ค.

1
npx lerna run test --scope={@project/web,@project/server}

lerna ์—๋Š” run๋ง๊ณ ๋„ ์œ ์šฉํ•œ command๊ฐ€ ๋งŽ์ด ์กด์žฌํ•œ๋‹ค.

์•„๋ž˜์—๋Š” ๊ฐ„๋‹จํžˆ ์ฃผ์š”๋ช…๋ น์–ด์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋ณด์•˜๋‹ค.

  • lerna bootstrap - ํŒจํ‚ค์ง€๋“ค์˜ ์˜์กด์„ฑ์„ ์„ค์น˜ํ•œ๋‹ค. yarn workspace๋ฅผ ์‚ฌ์šฉ์ค‘์ด๋ผ๋ฉด yarn์— ์œ„์ž„ํ•œ๋‹ค.
  • lerna clean - ํŒจํ‚ค์ง€์— node_modules ํด๋”๋ฅผ ๋ชจ๋‘ ์‚ญ์ œํ•œ๋‹ค.
  • lerna run - ํŒจํ‚ค์ง€์˜ ํŠน์ • scripts๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • lerna exec - ํŒจํ‚ค์ง€ ๊ฒฝ๋กœ์—์„œ ํŠน์ • command๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • lerna version - ํŒจํ‚ค์ง€๋ณ„๋กœ ๋ณ€๊ฒฝ๋œ ํŒจํ‚ค์ง€๋งŒ version bump

์ž์„ธํ•œ ์˜ต์…˜์ด๋‚˜ ์‚ฌ์šฉ์˜ˆ์‹œ๋Š” lerna github page์„ ์ฐธ๊ณ ํ•˜๋„๋ก ํ•˜์ž.

๋งˆ๋ฌด๋ฆฌ

ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋‹ค๋ณด๋ฉด โ€œ์ด ๋ชจ๋“ˆ์€ ๋‹ค๋ฅธ๊ณณ์—์„œ๋„ ์“ฐ์ผ ๊ฒƒ ๊ฐ™์€๋ฐ?โ€ ์ด๋ ‡๊ฒŒ ์ƒ๊ฐํ•ด๋ณธ๊ฒŒ ๋งŽ์ด ์žˆ์—ˆ๋˜ ๊ฒƒ ๊ฐ™๋‹ค.
์ง„ํ–‰ํ–ˆ๋˜ reactํ”„๋กœ์ ํŠธ ์ค‘ ์—ฌ๋Ÿฌ ํ”„๋กœ์ ํŠธ์—์„œ ๊ณตํ†ต์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” UI๋“ค์€ storybook๊ณผ ํ•จ๊ป˜ component ๋ชจ์Œ์„ ๋งŒ๋“ค์–ด๋‘๊ณ  ์‚ฌ์šฉํ•œ ์ ์ด ์žˆ๋‹ค. ํ•˜์ง€๋งŒ ํ”„๋กœ์ ํŠธ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๊ฐ€ ๋ถ„๋ฆฌ๋˜์–ด ์žˆ์—ˆ๊ณ  ๊ฐ™์ด ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„  npm git repository๋ฅผ ์ด์šฉํ•˜๊ฑฐ๋‚˜ git submodule์„ ์„ ํƒํ•ด์•ผํ–ˆ๋Š”๋ฐ ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ์—ฌ๋Ÿฌ๊ฐœ ๋„์›Œ์•ผํ•˜๊ณ  ์กฐ๊ทธ๋งŒ ๋ณ€๊ฒฝ์—๋„ ๋ฒ„์ „์„ ์˜ฌ๋ฆฌ๊ณ  ๋‹ค์‹œ ๋ฐ›์•„์•ผ๋˜์„œ ๋ฒˆ๊ฑฐ๋กœ์› ๋˜ ๊ฒฝํ—˜์ด ์žˆ๋‹ค. ๋งŒ์•ฝ ๋ชจ๋…ธ๋ฆฌํฌ๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ๋‹ค๋ฉด ์ข€ ๋” ๋‚˜์€ ๋ฐฉ๋ฒ•์œผ๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์•˜์„๊นŒ ํ•˜๋Š” ์ƒ๊ฐ์ด ๋“ ๋‹ค.
๋ชจ๋…ธ๋ฆฌํฌ๊ฐ€ ๋ฉ€ํ‹ฐ๋ฆฌํฌ๋ณด๋‹ค ๋ฌด์กฐ๊ฑด ์ข‹๋‹ค๊ณ  ์ƒ๊ฐํ•˜์ง„ ์•Š๋Š”๋‹ค. ๋‹ค๋งŒ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์•Œ์•„๋‘๋ฉด ์ƒํ™ฉ์— ๋งž์ถฐ์„œ ์ข‹์€ ๊ตฌ์กฐ๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ์„๊ฒƒ ๊ฐ™๋‹ค.

Ref