Skip to content

feat(create): respect tsOnly template flag (with-tsrx is TypeScript-only) - #90

Merged
ryansolid merged 1 commit into
mainfrom
feat/ts-only-templates
Sep 2, 2026
Merged

feat(create): respect tsOnly template flag (with-tsrx is TypeScript-only)#90
ryansolid merged 1 commit into
mainfrom
feat/ts-only-templates

Conversation

@ryansolid

Copy link
Copy Markdown
Contributor

Summary

  • Adds a tsOnly per-template flag to the templates manifest handling (ManifestTemplate), flagged upstream on solid-v2/with-tsrx in templates e5ccf24.
  • When the selected template is tsOnly, the "Use Typescript?" prompt is skipped and the JS conversion never runs. An explicit --js flag (or picking a tsOnly template after answering JS interactively) prints a short notice and continues as TypeScript.
  • Why: the JS conversion deletes tsconfig.json, which carries with-tsrx's TSRX editor wiring (@tsrx/typescript-plugin entry + tsrx compiler selector) and backs its tsrx-tsc typecheck script. A JS flavor of a TSRX template is nonsensical.
  • Baked fallback mirrors the manifest: with-tsrx added to SOLID_V2_TEMPLATES, flagged tsOnly in BAKED_GROUPS.

Test plan

  • Full suite green: 54 tests / 10 files (6 new: prompt skipped for tsOnly arg, --js notice + TS output, interactive JS→tsOnly pick forces TS, non-tsOnly templates unaffected in both flag and prompt paths, manifest flag parsing + baked entry).
  • Scaffolded with-tsrx end-to-end against live templates main with --js: notice printed, no prompt, tsconfig.json + .vscode/ + typecheck script survive, tsrx-tsc --noEmit passes, dev server boots and serves the app.

Made with Cursor

…mplates

Templates flagged tsOnly in templates.json (solid-v2/with-tsrx, flagged in
templates e5ccf24) must never go through the JS conversion: sucrase passes
.tsrx files through verbatim, but the conversion deletes tsconfig.json,
which carries the template's TSRX editor wiring (@tsrx/typescript-plugin
entry + tsrx compiler selector) and backs its tsrx-tsc typecheck script.

When the selected template is tsOnly the "Use Typescript?" prompt is
skipped entirely; an explicit --js flag (or a JS answer followed by picking
a tsOnly template from the list) prints a short notice and continues as
TypeScript. Non-tsOnly templates are unaffected.

The baked fallback mirrors the manifest: with-tsrx added to
SOLID_V2_TEMPLATES with tsOnly in BAKED_GROUPS. Suite: 54 tests / 10 files
(6 new). Scaffolded with-tsrx against live templates main: tsconfig.json,
.vscode/ and the typecheck script survive, tsrx-tsc passes, dev boots.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ryansolid
ryansolid merged commit e3f5cf3 into main Sep 2, 2026
3 checks passed
@ryansolid
ryansolid deleted the feat/ts-only-templates branch September 2, 2026 22:32
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