Skip to content

Make import-flags additive and handle Figma exports - #15

Merged
codecalm merged 3 commits into
mainfrom
fix-import-script
Oct 8, 2026
Merged

codecalm merged 3 commits into
mainfrom
fix-import-script

Conversation

@codecalm

@codecalm codecalm commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

What

  • import-flags now only imports the SVGs present in import/. It no longer deletes other flags from src/ or entries from flags.json. This matches how the icons repo imports.
  • Unwraps the multiline <g> wrapper that svgo pretty-printing leaves around Figma exports. The old regex only matched single-line output, so the <g> stayed and validation failed.

Why

Running the script with two files in import/ wiped all other flags.

Changeset

None. Build tooling only, no published package changes.

…orts

The import script treated the import/ directory as the full flag set and
deleted every src/ flag and flags.json entry that was not in it. It now
imports only the files present in import/, like the icons repo.

It also unwraps the multiline <g> wrapper that svgo pretty-printing
leaves around Figma exports and strips fill-rule/clip-rule attributes,
both of which failed validation.
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tabler-flags Ready Ready Preview Oct 8, 2026 12:17pm UTC

Request Review

@codecalm
codecalm merged commit e27a85d into main Oct 8, 2026
12 checks passed
@codecalm
codecalm deleted the fix-import-script branch October 8, 2026 12:18

This branch was successfully deployed

1 active deployment
Preview — 2042863e Deployed Oct 8, 2026 by vercel[bot]
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