Add template generalization features: rename script, common components, multi-screen guide - #4
Merged
veillette merged 1 commit intoJun 14, 2026
Conversation
…s, multi-screen guide - scripts/rename-sim.ts: automated fork/rename replaces all template identifiers in file content and renames files/folders in one pass; registered as `npm run rename` - src/common/SimPanel.ts: pre-themed Panel wrapper that uses SimColors automatically; every control panel in a forked sim should use this - src/common/TimeModel.ts: composable play/pause + elapsed-time model for animated sims; compose into screen model, wire view to TimeControlNode - doc/multi-screen.md: complete guide covering independent vs. shared-model architectures, file structure, StringManager changes, home-screen icons, per-screen a11y strings, and usage beyond direct copy (GitHub template, monorepo, npm create, git subtree) - CLAUDE.md: updated with new common-component API examples, multi-screen summary, rename-script instructions, and usage-beyond-copy table - doc/implementation-notes.md: updated architecture diagram and fork checklist to reflect new common components and rename script https://claude.ai/code/session_01HGpwLPoEwEd4yAqLJPUmAn
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
| if (stat.isDirectory()) { | ||
| processContents(full); | ||
| } else if (TEXT_EXTS.has(fileExtension(entry))) { | ||
| const original = readFileSync(full, "utf8"); |
| const original = readFileSync(full, "utf8"); | ||
| const transformed = applyReplacements(original); | ||
| if (transformed !== original) { | ||
| writeFileSync(full, transformed, "utf8"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
identifiers in file content and renames files/folders in one pass;
registered as
npm run renameautomatically; every control panel in a forked sim should use this
for animated sims; compose into screen model, wire view to
TimeControlNode
shared-model architectures, file structure, StringManager changes,
home-screen icons, per-screen a11y strings, and usage beyond direct
copy (GitHub template, monorepo, npm create, git subtree)
summary, rename-script instructions, and usage-beyond-copy table
checklist to reflect new common components and rename script
https://claude.ai/code/session_01HGpwLPoEwEd4yAqLJPUmAn