Skip to content

fix: place SVGs in component subdirectories with explicit format flags#2464

Open
blessuselessk wants to merge 1 commit intotscircuit:mainfrom
blessuselessk:fix/svg-output-path-placement
Open

fix: place SVGs in component subdirectories with explicit format flags#2464
blessuselessk wants to merge 1 commit intotscircuit:mainfrom
blessuselessk:fix/svg-output-path-placement

Conversation

@blessuselessk
Copy link

@blessuselessk blessuselessk commented Mar 18, 2026

Summary

  • When --pcb-svgs, --schematic-svgs, or other explicit image format flags are used, SVGs are now generated for all builds (matching --glbs behavior) instead of only the preview build
  • Previously, building multiple components with --pcb-svgs --schematic-svgs would only generate SVGs for the preview component, and multi-build scenarios could result in SVGs landing at the dist root instead of component subdirectories

Fixes tscircuit/tscircuit#2550

Test plan

  • Added test: build --pcb-svgs --schematic-svgs places SVGs in each component subdirectory — builds two components, verifies SVGs exist in dist/first/ and dist/second/, and verifies no SVGs at dist/ root
  • All existing build tests pass (12/12 in build.test.ts, 8/8 in build-output-flags.test.ts, 2/2 in concurrency tests)

…chematic-svgs

When explicit image format flags (--pcb-svgs, --schematic-svgs, --svgs,
--pngs, --3d, --pcb-only, --schematic-only) are used, generate images
for all builds instead of only the preview build. This matches --glbs
behavior and prevents SVGs from overwriting each other when building
multiple components.

Fixes tscircuit/tscircuit#2550
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.

tsci build --pcb-svgs --schematic-svgs places SVGs at dist root instead of component subdirectory

1 participant