feat(create): respect tsOnly template flag (with-tsrx is TypeScript-only) - #90
Merged
Conversation
…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>
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.
Summary
tsOnlyper-template flag to the templates manifest handling (ManifestTemplate), flagged upstream onsolid-v2/with-tsrxin templates e5ccf24.tsOnly, the "Use Typescript?" prompt is skipped and the JS conversion never runs. An explicit--jsflag (or picking a tsOnly template after answering JS interactively) prints a short notice and continues as TypeScript.tsconfig.json, which carries with-tsrx's TSRX editor wiring (@tsrx/typescript-pluginentry +tsrxcompiler selector) and backs itstsrx-tsctypecheck script. A JS flavor of a TSRX template is nonsensical.with-tsrxadded toSOLID_V2_TEMPLATES, flaggedtsOnlyinBAKED_GROUPS.Test plan
--jsnotice + TS output, interactive JS→tsOnly pick forces TS, non-tsOnly templates unaffected in both flag and prompt paths, manifest flag parsing + baked entry).with-tsrxend-to-end against live templates main with--js: notice printed, no prompt,tsconfig.json+.vscode/+typecheckscript survive,tsrx-tsc --noEmitpasses, dev server boots and serves the app.Made with Cursor