Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naldal/TuistAutoGen


https://github.com/naldal/TuistAutoGen

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        


Logo

[๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด๋กœ ์ฝ๊ธฐ](https://github.com/naldal/TuistAutoGen/blob/main/README.Ko.md) |
[๐Ÿ‡บ๐Ÿ‡ธ Read in English](https://github.com/naldal/TuistAutoGen/blob/main/README.md)

๐Ÿš€ Tuist ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ




TuistAutoGen์— ์˜ค์‹ ๊ฒƒ์„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค. TuistAutoGen์€ ํ•œ ๋ฒˆ์˜ ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰์œผ๋กœ Tuist ํ”„๋กœ์ ํŠธ ๋ผ์ดํ”„์‚ฌ์ดํด์„ ์™„๋ฒฝํ•˜๊ฒŒ ์ œ์–ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

TuistAutoGen์€ ๋‹จ์ˆœํ•œ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ๋„๊ตฌ ์ด์ƒ์ž…๋‹ˆ๋‹ค. ์ด๋Š” ํ”„๋กœ์ ํŠธ์˜ ์š”๊ตฌ์— ๋งž๊ฒŒ ์ง„ํ™”ํ•˜๋Š” ๋„๊ตฌ๋กœ, ํ”„๋กœ์ ํŠธ์˜ ํ•„์š”์— ๋”ฐ๋ผ ๋ฐœ์ „ํ•˜๋ฉฐ ์†์‰ฝ๊ฒŒ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. TuistAutoGen์€ ๋›ฐ์–ด๋‚œ ๋””์ž์ธ์œผ๋กœ ์‹ ์†ํ•œ ํ”„๋กœ์ ํŠธ ๋ชจ๋“ˆํ™”์™€ ํ”„๋ ˆ์ž„์›Œํฌ ์ œ์ž‘์„ ์œ„ํ•œ ์†”๋ฃจ์…˜์ž…๋‹ˆ๋‹ค. ์ด ๋ชจ๋“  ๊ฒƒ์ด ๋‹จ ํ•œ ๋ฒˆ์˜ ์‰˜ ์‹คํ–‰์œผ๋กœ ์ด๋ฃจ์–ด์ง‘๋‹ˆ๋‹ค!

## ์™œ TuistAutoGen๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ• ๊นŒ์š”?

์ผ๋ฐ˜์ ์œผ๋กœ Tuist๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋กœ์ ํŠธ๋ฅผ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ์€ ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ์–ด๋ ค์›€์„ ์ˆ˜๋ฐ˜ํ•ฉ๋‹ˆ๋‹ค:

๐Ÿ’€ **๋ณต์žก์„ฑ**

Tuist๋Š” ๊ฐ•๋ ฅํ•˜์ง€๋งŒ ํŠนํžˆ ์ดˆ๋ณด์ž์—๊ฒŒ๋Š” ์„ค์ •๊ณผ ๊ด€๋ฆฌ๊ฐ€ ๋‹ค์†Œ ๋ณต์žกํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ๊ตฌ์„ฑ ํŒŒ์ผ์ด ๊ด€๋ จ๋˜๋ฉฐ, ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑ, ์กฐ์ž‘ ๋ฐ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด Tuist DSL(Domain Specific Language)์„ ์ดํ•ดํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

โฐ **์‹œ๊ฐ„ ์†Œ์š”**

ํ”„๋กœ์ ํŠธ ์„ค์ •, ์ข…์†์„ฑ ๊ด€๋ฆฌ, ํƒ€๊ฒŸ ์ƒ์„ฑ ๋ฐ Xcode ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ๊ณผ์ •์€ ํŠนํžˆ ์—ฌ๋Ÿฌ ๋ชจ๋“ˆ๊ณผ ์ข…์†์„ฑ์„ ๊ฐ€์ง„ ํฐ ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ ์‹œ๊ฐ„์ด ๋งŽ์ด ์†Œ์š”๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐ŸงŸ **ํœด๋จผ์—๋Ÿฌ ์ทจ์•ฝ**

์ˆ˜๋™์œผ๋กœ ๊ตฌ์„ฑ ๋ฐ ์„ค์ •ํ•˜๋Š” ๊ณผ์ •์—์„œ ์ธ๊ฐ„์˜ ์‹ค์ˆ˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ด๋Š” ๋นŒ๋“œ ์˜ค๋ฅ˜๋‚˜ ์‹คํ–‰ ์‹œ ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ˜“ **๋ชจ๋“ˆํ™”์˜ ์–ด๋ ค์›€**

Tuist๋Š” ๋ชจ๋“ˆํ™”๋ฅผ ์ง€์›ํ•˜์ง€๋งŒ, ๋ชจ๋“ˆ ํ”„๋กœ์ ํŠธ ์„ค์ •์€ ๋„์ „์ ์ด๋ฉฐ ์—ฌ๋Ÿฌ ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์นฉ๋‹ˆ๋‹ค. ๊ฐœ๋ณ„ ๋ชจ๋“ˆ ์ƒ์„ฑ, ์ƒํ˜ธ ์ข…์†์„ฑ ๊ด€๋ฆฌ, ๊ฐ ๋ชจ๋“ˆ์ด ๋…๋ฆฝ์ ์œผ๋กœ ๋นŒ๋“œ๋  ์ˆ˜ ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๊ฒƒ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

๐Ÿฆฟ **ํ”„๋ ˆ์ž„์›Œํฌ ์ƒ์„ฑ**

ํ”„๋กœ์ ํŠธ์˜ ํ”„๋ ˆ์ž„์›Œํฌ ์ƒ์„ฑ์€ ํƒ€๊ฒŸ ์„ค์ •, ์ข…์†์„ฑ ์—ฐ๊ฒฐ ๋ฐ ๋นŒ๋“œ ์„ค์ • ๊ด€๋ฆฌ ๋“ฑ ์ˆ˜๋งŽ์€ ์ˆ˜๋™ ์ž‘์—…์„ ํ•„์š”๋กœ ํ•ฉ๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๋ณธ์งˆ์ ์ธ ์–ด๋ ค์›€์€ ๊ฐœ๋ฐœ ์†๋„์˜ ์ €ํ•˜, ๋ฒ„๊ทธ ๋ฐœ์ƒ ์œ„ํ—˜์˜ ์ฆ๊ฐ€, ๊ทธ๋ฆฌ๊ณ  ์‹œ์Šคํ…œ์— ์ƒˆ๋กœ์šด ๊ฐœ๋ฐœ์ž๋“ค์—๊ฒŒ๋Š” ๋”์šฑ ๊ฐ€ํŒŒ๋ฅธ ํ•™์Šต ๊ณก์„ ์„ ์ดˆ๋ž˜ํ•ฉ๋‹ˆ๋‹ค.

๋ฐ˜๋ฉด์— TuistAutoGen์€ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ, ๋ชจ๋“ˆํ™” ๋ฐ ํ”„๋ ˆ์ž„์›Œํฌ ์ƒ์„ฑ์„ ์ž๋™ํ™”ํ•˜์—ฌ ์ด๋Ÿฌํ•œ ๋‹จ๊ณ„๋ฅผ ๊ทน์ ์œผ๋กœ ๋‹จ์ˆœํ™”ํ•˜๋ฏ€๋กœ ์•ž์„œ ์–ธ๊ธ‰ํ•œ ์žฅ์• ๋ฌผ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค. TuistAutoGen์„ ์‚ฌ์šฉํ•˜๋ฉด Tuist๋ฅผ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ํ”„๋กœ์ ํŠธ ์„ค์ • ๊ณผ์ •์„ ๊ฐ€์†ํ™”์‹œํ‚ค๊ณ , ํœด๋จผ์—๋Ÿฌ ๊ฐ€๋Šฅ์„ฑ์„ ์ค„์ด๋ฉฐ, ๋ณต์žกํ•˜๊ณ  ๋ชจ๋“ˆํ™”๋œ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฐ„๋‹จํ•˜๊ณ  ์ง๊ด€์ ์œผ๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

## ์‚ฌ์šฉ๋ฒ•

### ํ•„์ˆ˜ ์„ค์น˜
TuistAutoGen์€ Tuist 3.11.0 ๋ฒ„์ „์„ ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
TuistAutoGen์ด ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™ํ•˜๋ ค๋ฉด ๋ฐ˜๋“œ์‹œ ์ด ๋ฒ„์ „์„ ์ง€์ผœ์ฃผ์„ธ์š”.

ํ•˜์ง€๋งŒ ๋งฅ์— ์•„๋ฌด๋Ÿฐ ์„ค์น˜๊ฐ€ ๋˜์–ด์žˆ์ง€ ์•Š์€ ์ƒํƒœ๋ผ๋ฉด Homebrew๋‚˜ mise, curl ๋“ฑ์˜ ์œ ํ‹ธ๋ฆฌํ‹ฐ ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ €๋Š” ์ด ๋ฌธ์ œ๋ฅผ ์กฐ๊ธˆ ๋” ์šฐ์•„ํ•˜๊ฒŒ ํ’€์–ด๋ณด๊ธฐ ์œ„ํ•ด TuistInstaller๋ผ๋Š” ๋˜ ๋‹ค๋ฅธ ์‰˜ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด ๋ฐฐํฌํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
[TuistInstaller ๋ฐ”๋กœ๊ฐ€๊ธฐ](https://github.com/naldal/TuistInstaller/tree/master)

TuistInstaller๋Š” Tuist์„ค์น˜์— ํ•„์š”ํ•œ ์š”์†Œ๋“ค์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

### ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ•
> **Note:** TuistAutoGen ์€ bash 5.2.15 ๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „์—์„œ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. (aarch64-apple-darwin22.1.0)
>
> ๋„ˆ๋ฌด ๋‚ฎ์€ Bash ๋ฒ„์ „์€ ์‰˜ ์Šคํฌ๋ฆฝํŠธ์˜ ์ž‘๋™์— ๋ฌธ์ œ๊ฐ€ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹จ์ผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ƒ์„ฑํ•˜๋ ค๋ฉด bash ์‰˜์—์„œ ์•„๋ž˜ ๋ช…๋ น์„ ์ž…๋ ฅํ•˜์„ธ์š”.
```bash
./autoGenerator.sh --main $projectName
```
์˜ˆ๋ฅผ ๋“ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
```bash
./autoGenerator.sh --main CoreProject
```
์„ค์ •ํ•œ ์ด๋ฆ„์€ ๋ฉ”์ธ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์ด๋ฆ„์ด ๋ฉ๋‹ˆ๋‹ค!

๊ณง ์ด์–ด, ํ”„๋กœ์ ํŠธ์˜ ์ด๋ฆ„์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
```bash
๐Ÿƒ Start to generate Tuist Projects!
โœ๏ธ What is the name of new Project?
โœ๏ธ Your Name of Project is :
<ํ”„๋กœ์ ํŠธ ์ด๋ฆ„ ์„ค์ •>
```
์„ค์ •ํ•œ ์ด๋ฆ„์€ ์ „์ฒด ํ”„๋กœ์ ํŠธ์˜ ์ด๋ฆ„์ด ๋ฉ๋‹ˆ๋‹ค!

๐Ÿ“ฆTuistAutoGenerator
โ”— ๐Ÿ“œ autoGenerator.sh

โ”ฃ ๐Ÿ“‚ temp

โ”— ๐Ÿ“‚ **ํ”„๋กœ์ ํŠธ**

ย ย โ”— ๐Ÿ“‚ **Main ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜**

์ด์ œ ์œ„์ฒ˜๋Ÿผ ์„ค์ •ํ•œ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„ ์•„๋ž˜์— ๋ฉ”์ธ ํ”„๋กœ์ ํŠธ๊ฐ€ ์ƒ์„ฑ๋์Šต๋‹ˆ๋‹ค.
Tuist ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•˜๋ ค๋ฉด ์„ค์ •ํ•œ ํ”„๋กœ์ ํŠธ ํด๋”๋กœ ์ด๋™ํ•˜์„ธ์š”.
```bash
cd ํ”„๋กœ์ ํŠธ์ด๋ฆ„
```

์ด์ œ tuist ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด generate ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
```bash
tuist generate
```

..์ด๊ฒŒ ๋์ž…๋‹ˆ๋‹ค!
๊ธฐ๋ณธ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ƒ์„ฑ์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๐ŸŽ‰

## "Main" ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ

๐Ÿ–๏ธ ์ง„ํ–‰ํ•˜๊ธฐ ์ „์—, ์ƒ์„ฑํ•œ Main ํ”„๋กœ์ ํŠธ์˜ ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. Main ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๊ทธ๋ฆผ์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.


mainProjectHiearchy

Main ํ”„๋กœ์ ํŠธ์—๋Š” Supports์™€ Target๋ผ๋Š” ๋‘ ๊ฐœ์˜ ํด๋”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
- **Supports ํด๋”**๋Š” InfoPlist์™€ BridgingHeader ํด๋”๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ํด๋”๋Š” ํŠน์ • ๋ชฉ์ ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค:
- *InfoPlist ํด๋”*๋Š” ํ•„์š”์— ๋”ฐ๋ผ ๋‹ค์–‘ํ•œ ์œ ํ˜•์˜ ์ •๋ณด๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ๋Š” Info.plist ํŒŒ์ผ์„ ๋ณด๊ด€ํ•ฉ๋‹ˆ๋‹ค.
- *BridgingHeader ํด๋”*๋Š” Swift์™€ Objective-C ๊ฐ„์˜ ์ƒํ˜ธ ์ž‘์šฉ์„ ์šฉ์ดํ•˜๊ฒŒ ํ•˜๋Š” ํ—ค๋” ํŒŒ์ผ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
- **Target ํด๋”** ๋Š” Resources, Sources, Tests, TestResources, XCConfigs ํด๋”๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.
- *Resources ํด๋”*๋Š” ์ด๋ฏธ์ง€, ์ƒ‰์ƒ, ๋กœ์ปฌ๋ผ์ด์ฆˆ ๋ฌธ์ž์—ด ๋“ฑ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์ž์‚ฐ์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค. TuistAutoGen์€ ์ž๋™์œผ๋กœ Image.xcassets ๋ฐ Color.xcassets ์นดํƒˆ๋กœ๊ทธ๋ฅผ ์ด ํด๋” ๋‚ด์— ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
- *Sources ํด๋”*๋Š” ์ž์œ ๋กญ๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ๊ณณ์ž…๋‹ˆ๋‹ค.
- *Tests ํด๋”*๋Š” ๋‹จ์œ„ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด ์ง€์ •๋œ ํด๋”์ž…๋‹ˆ๋‹ค. TuistAutoGen์€ ํ…Œ์ŠคํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ธ Quick๊ณผ Nimble์„ ์ž๋™์œผ๋กœ ํฌํ•จ์‹œํ‚ค๋ฉฐ, ํ…Œ์ŠคํŠธ ์ˆ˜ํ–‰์„ ๊ฐ•๋ ฅํžˆ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
- *TestResources ํด๋”*๋Š” ํŠน์ • ํ…Œ์ŠคํŠธ์šฉ ๋ฆฌ์†Œ์Šค๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋Š” ๊ณต๊ฐ„์ž…๋‹ˆ๋‹ค.
- *XCConfigs ํด๋”*๋Š” ์‚ฌ์šฉ์ž ์ •์˜ Xcode ๊ตฌ์„ฑ ํŒŒ์ผ์„ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

## ์ž…๋ ฅ ์˜ต์…˜ ์ดํ•ดํ•˜๊ธฐ

TuistAutoGen์—๋Š” main, includeOnly, include ๋ฐ framework์˜ ๋„ค ๊ฐ€์ง€ ์ž…๋ ฅ ์˜ต์…˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ์˜ต์…˜์€ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์ค‘์— ์ƒ์„ฑํ•  ํ”„๋กœ์ ํŠธ ์œ ํ˜•์„ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค.

|์ž…๋ ฅ ์˜ต์…˜ | ์„ค๋ช…
|----------------|-------------------------------
`--main` |Main ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜
`--includeOnly` |Main ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜
`--include` |Main ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋ฉด์„œ ์ž์ฒด ์†Œ์Šค์™€ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ฐ€์ง„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜
`--framework` |ํ”„๋ ˆ์ž„์›Œํฌ

### ์ž…๋ ฅ ์˜ต์…˜ ์‚ฌ์šฉํ•˜๊ธฐ
์ด์ œ ์ด๋Ÿฌํ•œ ์˜ต์…˜๋“ค์„ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์–‘ํ•œ ๊ฒฝ์šฐ์— ๋Œ€์‘ํ•ด๋ด…์‹œ๋‹ค!

์ผ€์ด์Šค 1) ๋ฉ”์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ includeOnly ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค๊ณ  ์‹ถ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด๋ด…์‹œ๋‹ค.

```bash
./autoGenerator.sh --main $Main_ProjectName --includeOnly $Include_Only_ProjectName
```

์•„๋ž˜์™€ ๊ฐ™์€ ๊ตฌ์กฐ๊ฐ€ ๋งŒ๋“ค์–ด์ง‘๋‹ˆ๋‹ค.

๐Ÿ“ฆTuistAutoGenerator
โ”— ๐Ÿ“œ autoGenerator.sh

โ”ฃ ๐Ÿ“‚ temp

โ”— ๐Ÿ“‚ **ํ”„๋กœ์ ํŠธ**

ย ย โ”— ๐Ÿ“‚ **Main ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜**

ย ย โ”— ๐Ÿ“‚ **IncludeOnly ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜**



์ผ€์ด์Šค 2) ๋‘ ๊ฐœ์˜ includeOnly ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ํ•˜๋‚˜์˜ include ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค์–ด ๋ณผ๊นŒ์š”?

```bash
./autoGenerator.sh --main $Main_ProjectName --includeOnly $Include_Only_ProjectName_One --includeOnly $Include_Only_ProjectName_Two --include $Include_ProjectName

```

๐Ÿ“ฆTuistAutoGenerator
โ”— ๐Ÿ“œ autoGenerator.sh

โ”ฃ ๐Ÿ“‚ temp

โ”— ๐Ÿ“‚ **ํ”„๋กœ์ ํŠธ**

ย ย โ”— ๐Ÿ“‚ **Main ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜**

ย ย โ”— ๐Ÿ“‚ **IncludeOnly ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ 1**

ย ย โ”— ๐Ÿ“‚ **IncludeOnly ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ 2**


์ผ€์ด์Šค 3) ํ”„๋ ˆ์ž„์›Œํฌ ์ƒ์„ฑ์€ ์–ด๋–จ๊นŒ์š”?

```bash
./autoGenerator.sh --main $Main_ProjectName --framework $Framework_ProjectName
```

๐Ÿ“ฆTuistAutoGenerator
โ”— ๐Ÿ“œ autoGenerator.sh

โ”ฃ ๐Ÿ“‚ temp

โ”— ๐Ÿ“‚ **ํ”„๋กœ์ ํŠธ**

ย ย โ”— ๐Ÿ“‚ **ํ”„๋ ˆ์ž„์›Œํฌ**


์ด์ œ๋ถ€ํ„ฐ ์ด ์˜ต์…˜๋“ค์ด ๋ฌด์—‡์„ ์˜๋ฏธํ•˜๋Š”์ง€ ์•Œ์•„๋ณด๊ณ  ์ด๋“ค์˜ ๊ตฌ์กฐ์™€ ์™œ ์ด๊ฒƒ๋“ค์ด ํ•„์š”ํ•œ์ง€์— ๋Œ€ํ•ด์„œ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค

## "IncludeOnly" ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ
์ด ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด "includeOnly" ํ”„๋กœ์ ํŠธ์—๋Š” ์†Œ์Šค์™€ ๋ฆฌ์†Œ์Šค๊ฐ€ ์—†๋Š” ์ƒํƒœ๋กœ ์œ ์ง€๋˜์ง€๋งŒ Main ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ํด๋”๊ฐ€ ํฌํ•จ๋œ ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


includeOnlyProjectHiearchy

### `--includeOnly` ์˜ต์…˜์˜ ํ•„์š”์„ฑ
์ด ์˜ต์…˜์€ "includeOnly" ํ”„๋กœ์ ํŠธ์— ์ถ”๊ฐ€์ ์ธ ๋ฆฌ์†Œ์Šค๋‚˜ ์†Œ์Šค ํŒŒ์ผ์„ ํฌํ•จํ•˜์ง€ ์•Š์œผ๋ฉด์„œ๋„ ์ฃผ ํ”„๋กœ์ ํŠธ์—์„œ ํ•„์š”ํ•œ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ํฌํ•จํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๋Œ€๊ทœ๋ชจ ํ”„๋กœ์ ํŠธ์—์„œ ์„œ๋กœ ๋‹ค๋ฅธ ๊ตฌ์„ฑ ์š”์†Œ๊ฐ€ ๊ณต์œ  ๋ฆฌ์†Œ์Šค๋ฅผ ์ฐธ์กฐํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๋‚˜ ๊ฐ„์†Œํ™”๋œ ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋ฅผ ์œ ์ง€ํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•œ ๊ฒฝ์šฐ์— ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค. --includeOnly ์˜ต์…˜์€ ๋‚ด๋น„๊ฒŒ์ด์…˜๊ณผ ๊ด€๋ฆฌ๋ฅผ ๊ฐ„์†Œํ™”ํ•˜๋ฉฐ, ๋ณด๋‹ค ๊ฐ„๊ฒฐํ•œ ํ”„๋กœ์ ํŠธ ์„ค์ •๊ณผ ์œ ์ง€ ๊ด€๋ฆฌ ํ”„๋กœ์„ธ์Šค๋ฅผ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด, ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ณ€ํ˜•์„ ๊ฐ€์ง„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ฐœ๋ฐœํ•˜๋Š” ์‹œ๋‚˜๋ฆฌ์˜ค๋ฅผ ๊ณ ๋ คํ•ด๋ด…์‹œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด "Dev" ๋ฒ„์ „๊ณผ "Prod" ๋ฒ„์ „์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋‘ ๋ฒ„์ „์€ ๋™์ผํ•œ ๊ธฐ๋ณธ ๊ตฌ์กฐ์™€ ๋งŽ์€ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ณต์œ ํ•˜์ง€๋งŒ, "Dev" ๋ฒ„์ „์€ ์ถ”๊ฐ€์ ์ธ ๋””๋ฒ„๊น… ๋„๊ตฌ, ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ ๋˜๋Š” ๊ตฌ์„ฑ ์„ค์ •์„ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ๊ฒฝ์šฐ, `--includeOnly` ์˜ต์…˜์€ ๊ฐ•๋ ฅํ•œ ๋„๊ตฌ๊ฐ€ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” ์ž‘๋™ ๋ฐฉ์‹์˜ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค:

์ฃผ ํ”„๋กœ์ ํŠธ์—๋Š” "Dev"์™€ "Prod" ๋ฒ„์ „ ๋ชจ๋‘์—์„œ ๊ณต์œ ๋˜๋Š” ๋ชจ๋“  ์†Œ์Šค ์ฝ”๋“œ์™€ ๋ฆฌ์†Œ์Šค๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. ์ด ํ”„๋กœ์ ํŠธ๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ธฐ๋ฐ˜์ด ๋ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์œผ๋กœ, "Dev" ๋ฒ„์ „์„ ์œ„ํ•œ "includeOnly" ํ”„๋กœ์ ํŠธ๋ฅผ ๋ณ„๋„๋กœ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. `--includeOnly` ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด ํ”„๋กœ์ ํŠธ๋Š” Main ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ํด๋”๋ฅผ ํฌํ•จํ•˜์ง€๋งŒ ์ž์ฒด ์†Œ์Šค๋‚˜ ๋ฆฌ์†Œ์Šค๋Š” ๊ฐ€์ง€์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋Œ€์‹ , ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์—๋งŒ ํ•ด๋‹นํ•˜๋Š” ๋””๋ฒ„๊น… ๋„๊ตฌ, ์ถ”๊ฐ€ ๊ตฌ์„ฑ ์„ค์ • ๋˜๋Š” ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ ๋“ฑ์„ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ์„ค์ •์„ ํ†ตํ•ด "Dev" ๋ฒ„์ „๊ณผ "Prod" ๋ฒ„์ „ ์‚ฌ์ด๋ฅผ ์‰ฝ๊ฒŒ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋ฅผ ๊น”๋”ํ•˜๊ณ  ์ •๋ฆฌ๋œ ์ƒํƒœ๋กœ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ๋ฒ„์ „์€ ๊ณตํ†ต๋œ ๊ธฐ๋ณธ ๊ตฌ์กฐ์™€ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ณต์œ ํ•˜๋ฉด์„œ๋„ ๋ฒ„์ „๋ณ„ ์‚ฌ์šฉ์ž ์ •์˜๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค.

## "Include" ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ
`--include` ์˜ต์…˜์€ include ํ”„๋กœ์ ํŠธ๊ฐ€ Main ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ํด๋”๋ฅผ ํฌํ•จํ•˜๋ฉด์„œ๋„ ๊ณ ์œ ํ•œ ์†Œ์Šค์™€ ๋ฆฌ์†Œ์Šค๋ฅผ ์œ ์ง€ํ•˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.


includeProjectHiearchy

### `--include` ์˜ต์…˜์˜ ํ•„์š”์„ฑ
์ด ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด Main ํ”„๋กœ์ ํŠธ์—์„œ ํ•„์š”ํ•œ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ํ†ตํ•ฉํ•˜๋Š” ๊ณผ์ •์„ ์šฉ์ดํ•˜๊ฒŒ ํ•˜๋ฉด์„œ๋„ include ํ”„๋กœ์ ํŠธ๊ฐ€ ๊ฐœ๋ณ„ ๋ฆฌ์†Œ์Šค์™€ ์†Œ์Šค ํŒŒ์ผ์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ํ”„๋กœ์ ํŠธ์˜ ๋‹ค๋ฅธ ๊ตฌ์„ฑ ์š”์†Œ๊ฐ€ ๊ณต์œ  ๋ฆฌ์†Œ์Šค๋ฅผ ์ฐธ์กฐํ•ด์•ผ ํ•˜์ง€๋งŒ ๋…๋ฆฝ์ ์ธ ํŒŒ์ผ์„ ์œ ์ง€ํ•ด์•ผ ํ•˜๋Š” ์ƒํ™ฉ์—์„œ ๋งค์šฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด, ๊ณตํ†ต๋œ ๊ตฌ์กฐ์™€ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ณต์œ ํ•˜์ง€๋งŒ ๊ฐ๊ฐ ๊ณ ์œ ํ•œ ๊ธฐ๋Šฅ์„ ํ•„์š”๋กœ ํ•˜๋Š” ์—ฌ๋Ÿฌ ๋ชจ๋“ˆ๋กœ ๊ตฌ์„ฑ๋œ ํ”„๋กœ์ ํŠธ์—์„œ ์ž‘์—…ํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. `--include` ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐ ๋ชจ๋“ˆ์ด ๊ณ ์œ ํ•œ ๊ธฐ๋Šฅ์„ ์œ ์ง€ํ•˜๋Š” ๋™์‹œ์— ์ฃผ ํ”„๋กœ์ ํŠธ๋กœ๋ถ€ํ„ฐ ๊ณต์œ  ๊ตฌ์กฐ๋ฅผ ๋ณด์กดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

`--include` ์˜ต์…˜์€ ํ•ต์‹ฌ ๊ตฌ์กฐ๋ฅผ ์ผ๊ด€๋˜๊ฒŒ ์œ ์ง€ํ•˜๋Š” ๋™์‹œ์— ํ•„์š”ํ•œ ๊ณณ์—์„œ ๊ฐœ๋ณ„์„ฑ๊ณผ ์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅ์„ฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ํ”„๋กœ์ ํŠธ ๋‚ด๋น„๊ฒŒ์ด์…˜๊ณผ ๊ด€๋ฆฌ๋ฅผ ๊ฐ„์†Œํ™”ํ•˜๊ณ  ๊ฐœ๋ฐœ์ž์—๊ฒŒ ๋” ํšจ์œจ์ ์ธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

## "Framework" ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ
`--framework` ์˜ต์…˜์€ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ์ด ํ”„๋ ˆ์ž„์›Œํฌ๋Š” ๊ณ ์œ ํ•œ ๋ฆฌ์†Œ์Šค์™€ ์†Œ์Šค๋ฅผ ์œ ์ง€ํ•˜๋ฉฐ, ์ƒ˜ํ”Œ ์•ฑ๋„ ์ž๋™์œผ๋กœ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.


FrameworkHiearchy

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

์˜ˆ๋ฅผ ๋“ค์–ด, ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋„คํŠธ์›Œํ‚น์ด๋‚˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ด€๋ฆฌ์™€ ๊ฐ™์€ ์ผ๋ จ์˜ ๊ธฐ๋Šฅ์ด ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. `--framework` ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋Ÿฌํ•œ ๊ธฐ๋Šฅ์„ ํ”„๋ ˆ์ž„์›Œํฌ๋กœ ๋ฌถ์Œ์œผ๋กœ์จ ์ฝ”๋“œ์˜ ์ค‘๋ณต์„ ์ค„์ด๊ณ  ๊ฐœ๋ฐœ ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ฐ„์†Œํ™”ํ•˜๋ฉฐ ์ „์ฒด์ ์ธ ์ฝ”๋“œ ์‹ ๋ขฐ์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋˜ํ•œ ํ”„๋ ˆ์ž„์›Œํฌ๋Š” ์ƒ˜ํ”Œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ํ•จ๊ป˜ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค. ์ด๋Š” ํ”„๋ ˆ์ž„์›Œํฌ์˜ ๊ธฐ๋Šฅ์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๋ฐ ๋„์›€์„ ์ฃผ๋ฉฐ, ๊ฐœ๋ฐœ์ž๊ฐ€ ์ž์‹ ์˜ ํ”„๋กœ์ ํŠธ์— ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ํ†ตํ•ฉํ•˜๊ณ  ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ดํ•ดํ•˜๋Š” ๋ฐ ์‹ค์šฉ์ ์ธ ์˜ˆ์‹œ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

## ๐Ÿ—บ๏ธ ๋กœ๋“œ๋งต

* [x] ๐Ÿ“ฆ framework ๋‹จ์ผ ์ƒ์„ฑ ๊ฐ€๋Šฅํ™”
* [ ] ๐Ÿซฅ auto codesign ์ ์šฉ
* [ ] ๐Ÿ–Œ๏ธ tuist stencil ์ ์šฉ

## ๋งˆ์น˜๋ฉฐ
์ด๋ ‡๊ฒŒ ํ•ด์„œ ๊ฐ•๋ ฅํ•œ ๋„๊ตฌ์ธ TuistAutoGen์„ ์‚ฌ์šฉํ•˜์—ฌ ์†์‰ฝ๊ฒŒ Tuist ํ”„๋กœ์ ํŠธ๋ฅผ ๊ตฌ์ถ•ํ•  ์ค€๋น„๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

TuistAutoGen์„ ํ†ตํ•ด ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ๊ณผ์ •์„ ๊ฐ„์†Œํ™”ํ•˜๊ณ  ์ƒ์‚ฐ์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ค๋ฉฐ ํšจ์œจ์ ์ธ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์„ ์กฐ์„ฑํ•ด ๋ณด์„ธ์š”.

Enjoy your journey!

## โš–๏ธ License
The MIT License (MIT)

Copyright (c) 2023 Hamin Song

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.