Skip to content

fix(fast-test-harness): preserve subdirectory structure in generateStylesheets outDir#7535

Merged
radium-v merged 2 commits into
mainfrom
users/radium-v/fix-generate-io
May 28, 2026
Merged

fix(fast-test-harness): preserve subdirectory structure in generateStylesheets outDir#7535
radium-v merged 2 commits into
mainfrom
users/radium-v/fix-generate-io

Conversation

@radium-v
Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

generateStylesheets flattened per-component subdirectories when an outDir was supplied. Every generated .css file landed directly in outDir/ instead of outDir/<component>/<component>.styles.css, unlike generateFTemplates, which preserves the source structure.

The fix applies the same path.relative(distDir, ...) join already used in generate-templates.ts.

📑 Test Plan

Added a should preserve subdirectory structure in outDir test mirroring the equivalent template generator test. The existing should write to outDir when specified test still passes.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@radium-v radium-v self-assigned this May 28, 2026
@radium-v radium-v merged commit 1efcd16 into main May 28, 2026
14 checks passed
@radium-v radium-v deleted the users/radium-v/fix-generate-io branch May 28, 2026 15:26
janechu pushed a commit that referenced this pull request May 28, 2026
…ylesheets outDir (#7535)

* fix: correct output directory structure for generated CSS files

* Change files
@janechu janechu mentioned this pull request May 28, 2026
5 tasks
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.

2 participants