Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/rules/testing-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Test targets mirror source modules:
| `XcodeExportTests` | iOS export output |
| `AndroidExportTests` | Android export output |
| `FlutterExportTests` | Flutter export output |
| `FigmaAPITests` | API client, endpoints |
| `SVGKitTests` | SVG parsing, code generation |

Run specific tests:
Expand Down
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ pkl eval --format json <file.pkl> # Package URI requires published package

## Architecture

Thirteen modules in `Sources/`:
Twelve modules in `Sources/`:

| Module | Purpose |
| --------------- | --------------------------------------------------------- |
| `ExFigCLI` | CLI commands, loaders, file I/O, terminal UI |
| `ExFigCore` | Domain models (Color, Image, TextStyle), processors |
| `ExFigConfig` | PKL config parsing, evaluation, type bridging |
| `FigmaAPI` | Figma REST API client, endpoints, response models |
| `ExFig-iOS` | iOS platform plugin (ColorsExporter, IconsExporter, etc.) |
| `ExFig-Android` | Android platform plugin |
| `ExFig-Flutter` | Flutter platform plugin |
Expand All @@ -115,7 +114,7 @@ Thirteen modules in `Sources/`:
| `WebExport` | Web/React export (CSS variables, JSX icons) |
| `JinjaSupport` | Shared Jinja2 template rendering across Export modules |

**Data flow:** CLI -> PKL config parsing -> FigmaAPI fetch -> ExFigCore processing -> Platform plugin -> Export module -> File write
**Data flow:** CLI -> PKL config parsing -> FigmaAPI (external) fetch -> ExFigCore processing -> Platform plugin -> Export module -> File write
**Alt data flow (tokens):** CLI -> local .tokens.json file -> TokensFileSource -> ExFigCore models -> W3C JSON export

**Batch mode:** Single `@TaskLocal` via `BatchSharedState` actor — see `ExFigCLI/CLAUDE.md`.
Expand Down Expand Up @@ -258,7 +257,7 @@ See `ExFigCLI/CLAUDE.md` (Adding a New Subcommand).

### Adding a Figma API Endpoint

See `FigmaAPI/CLAUDE.md`.
FigmaAPI is now an external package (`swift-figma-api`). See its repository for endpoint patterns.

### Adding a Platform Plugin Exporter

Expand Down Expand Up @@ -326,6 +325,7 @@ NooraUI.formatLink("url", useColors: true) // underlined primary
| libpng | 1.6.45+ | PNG decoding |
| swift-custom-dump | 1.3.0+ | Test assertions |
| Noora | 0.54.0+ | Terminal UI design system |
| swift-figma-api | 0.1.0+ | Figma REST API client (async/await, rate limiting) |
| swift-svgkit | 0.1.0+ | SVG parsing, ImageVector/VectorDrawable generation |
| swift-resvg | 0.45.1 | SVG parsing/rendering |
| swift-docc-plugin | 1.4.5+ | DocC documentation |
Expand Down
11 changes: 10 additions & 1 deletion Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 3 additions & 21 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ let package = Package(
.package(url: "https://github.com/mattt/swift-yyjson", from: "0.5.0"),
.package(url: "https://github.com/apple/pkl-swift", from: "0.8.0"),
.package(url: "https://github.com/DesignPipe/swift-svgkit.git", from: "0.1.0"),
.package(url: "https://github.com/DesignPipe/swift-figma-api.git", from: "0.1.0"),
],
targets: [
// Main target
.executableTarget(
name: "ExFigCLI",
dependencies: [
"FigmaAPI",
.product(name: "FigmaAPI", package: "swift-figma-api"),
"ExFigCore",
"ExFigConfig",
"XcodeExport",
Expand Down Expand Up @@ -79,15 +80,6 @@ let package = Package(
exclude: ["CLAUDE.md", "AGENTS.md"]
),

// Loads data via Figma REST API
.target(
name: "FigmaAPI",
dependencies: [
"ExFigCore",
],
exclude: ["CLAUDE.md", "AGENTS.md"]
),

// Shared Jinja template rendering utilities
.target(
name: "JinjaSupport",
Expand Down Expand Up @@ -200,21 +192,11 @@ let package = Package(

// MARK: - Tests

.testTarget(
name: "FigmaAPITests",
dependencies: [
"FigmaAPI",
.product(name: "CustomDump", package: "swift-custom-dump"),
],
resources: [
.copy("Fixtures/"),
]
),
.testTarget(
name: "ExFigTests",
dependencies: [
"ExFigCLI",
"FigmaAPI",
.product(name: "FigmaAPI", package: "swift-figma-api"),
"ExFig-Flutter",
"ExFig-Web",
.product(name: "CustomDump", package: "swift-custom-dump"),
Expand Down
1 change: 0 additions & 1 deletion Sources/FigmaAPI/AGENTS.md

This file was deleted.

120 changes: 0 additions & 120 deletions Sources/FigmaAPI/CLAUDE.md

This file was deleted.

108 changes: 0 additions & 108 deletions Sources/FigmaAPI/Client.swift

This file was deleted.

38 changes: 0 additions & 38 deletions Sources/FigmaAPI/Endpoint/BaseEndpoint.swift

This file was deleted.

Loading
Loading