Skip to content

add web - #12

Merged
alexey1312 merged 5 commits into
mainfrom
alexey1312/web
Dec 13, 2025
Merged

add web#12
alexey1312 merged 5 commits into
mainfrom
alexey1312/web

Conversation

@alexey1312

Copy link
Copy Markdown
Collaborator

This pull request adds comprehensive support for exporting Figma assets to Web (React/TypeScript) projects in addition to the existing platforms (iOS, Android, Flutter). It introduces a new WebExport module, updates configuration and documentation to support web-specific options, and implements the necessary data structures and logic for handling web exports, including multiple configuration formats for colors, icons, and images.

The most important changes are:

Web Export Platform Support:

  • Added "Web" as a supported export platform throughout the project, including in the CLI, configuration files, and documentation. This includes updating descriptions, command options, and platform lists. [1] [2] [3] [4] [5] [6]

  • Introduced a new WebExport module in the Swift package, with its own target and test target, and included it as a dependency where appropriate. [1] [2] [3]

Configuration and Data Structures:

  • Extended the configuration schema (.claude/EXFIG.toon, CONFIG.md) to support web-specific export options, including new sections for web templates and parameters for colors, icons, and images. Added support for both single-object (legacy) and array (multi-source) formats for web configuration. [1] [2] [3] [4] [5]

  • Added a new Params.Web struct and related types (Colors, Icons, Images, and their corresponding entry/configuration enums) to Sources/ExFig/Input/Params.swift to represent and decode all web export configuration options, supporting both single and multiple entries for each asset type.

Loaders and Processing Logic:

  • Updated the IconsLoaderConfig and IconsLoader logic to support web exports, including a new forWeb factory method and adjustments to format handling for the web platform. [1] [2]

  • Updated image name parsing logic to correctly handle the web platform in addition to existing platforms.

Testing:

  • Added a new WebExportTests test target and updated the test targets list in both the package manifest and the meta/config files to ensure web export functionality is covered by automated tests. [1] [2]

Documentation:

  • Significantly expanded the documentation (CONFIG.md, README.md) to describe web export capabilities, configuration options, and usage examples, including support for array formats for colors, icons, and images. [1] [2] [3] [4] [5] [6]

These changes collectively enable ExFig to export design assets from Figma directly to modern web codebases, supporting scalable and flexible configuration for real-world design systems.

Proposal to extend ExFig with native Web/React support:
- CSS variables and TypeScript constants for colors
- React TSX components via SVGR pattern for icons
- Raw SVG/PNG asset export with barrel index files
- New WebExport module following FlutterExport patterns
@alexey1312
alexey1312 merged commit acead3d into main Dec 13, 2025
3 checks passed
@alexey1312
alexey1312 deleted the alexey1312/web branch December 13, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant