feat: Style Dictionary v4 기반 iOS 디자인 토큰 빌드 파이프라인 추가 - #1
Merged
Merged
Conversation
added 3 commits
May 12, 2026 22:22
- Figma Variables DTCG 포맷(Mode 1.tokens.json)을 단일 source로 사용
- TypeScript 기반 빌드(tsx + style-dictionary v4)
- 토큰을 Brand / Semantic / Component / Spacing / Radius 5개 레이어로 분리 출력
- iOS 산출물: Colors.xcassets(namespace 폴더) + 6개 Swift enum 파일
- Figma 색상 객체($value: {hex, components, ...})를 hex 문자열로 정규화하는 preprocessor 포함
- 토큰 reference({Colors.brand.primary.500}) 자동 해석
- Swift 예약어/숫자 leaf(default, Spacing.16) 안전 변환
- GitHub Actions로 push/PR 시 자동 빌드 + iOS 산출물 artifact 업로드
- build.yml 을 2단계 검증 + 자동 PR 흐름으로 재작성 · 1차: Style Dictionary v4 빌드 (DTCG type/alias 정합성) · 2차: Picke-iOS checkout 후 Tools/TokenGenerator.swift 실행 · 둘 다 통과 시 Picke-iOS 의 develop 으로 자동 PR (peter-evans/create-pull-request) - PR 브랜치는 chore/design-tokens-sync-<timestamp> 로 매번 신규 생성, 머지 시 자동 삭제 - README 의 전체 흐름도/사전 준비/추가 흐름 문단을 새 구조에 맞춰 갱신 - 동작에 필요한 secret 안내: IOS_REPO_PAT (Contents/PR write 권한)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
Figma Variables(DTCG W3C 표준) → Style Dictionary v4 → iOS Swift/xcassets 파이프라인을 추가합니다. 현재 레포에
Mode 1.tokens.json한 개만 올라와 있던 상태에서, 동작하는 토큰 시스템(TypeScript + npm run build + GitHub Actions 자동 빌드)으로 확장됩니다.변경 요약
tsx런너 +style-dictionary@^4,tsc --noEmit로 타입 검증Colors.xcassets/안에Brand/,Semantic/,Component/namespace 폴더로 정리 (94개 colorset)\$value: { hex, components, ... }객체를 hex 문자열로 정규화하는 preprocessor + alias 자동 해석default→\`default\`), 숫자 leaf(Spacing.16→Spacing.s16)build/ios/artifact 업로드산출물 예시
```swift
BrandColors.primary500 // Color("Brand/Primary500", bundle: .module)
SemanticColors.textPrimary // Color("Semantic/TextPrimary", bundle: .module)
ComponentColors.buttonPrimaryBackgroundDefault
Spacing.s16 // CGFloat = 16
Radius.`default` // CGFloat = 2
```
테스트
다음 단계 (별도 PR)
Mode 2.tokens.json) 지원