Skip to content

feat(create-taujs): scaffold a framework-free html project - #171

Merged
aoede3 merged 6 commits into
mainfrom
feat/create-taujs-html
Sep 7, 2026
Merged

aoede3 merged 6 commits into
mainfrom
feat/create-taujs-html

Conversation

@aoede3

@aoede3 aoede3 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Adds --framework html to the scaffolder, the fourth surface of the @taujs/html ruling now that 0.1.0 is published.

  • CLI value html, label "HTML (no component framework)"; renderer package @taujs/html; no Vite plugin (vitePlugin is now optional on the extras record)
  • The react-fallback ternaries for JSX options, renderer declaration, client files and the streaming description become exhaustive Record<Framework, ...> tables, so a missing framework is a compile error
  • Three .ts client files: page.ts (explicitly typed render function plus the application-owned escaper), entry-server.ts on createRenderer, entry-client.ts on onDataReady with real progressive enhancement and no hydration
  • README tree gains a per-framework note override so html's entry-client reads "Client enhancement entry (no hydration)"; react, vue and solid output is byte-identical to before
  • Every hard-coded framework matrix now includes html; the lifecycle test packs and boots all four frameworks and, for html, proves the production /streaming route with one bootstrap tag before the data script
  • getting-started names plain HTML wherever it lists the renderers and the peer table gains an @taujs/html row

Changeset: @taujs/create-taujs minor.

Add the html framework value: the label, the FRAMEWORK_EXTRAS/FRAMEWORK_META/
CLIENT_FILES entries, an optional FrameworkExtras.vitePlugin so generatePackageJson
adds a Vite plugin devDependency only when one exists, and RENDERER_DECLARATION /
JSX_OPTIONS records that replace the react-fallback ternaries in
generateTaujsConfig and generateTsConfig with exhaustive per-framework handling.

Add the three html client generators (page.ts's escapeHtml + renderPage,
entry-server.ts's createRenderer, entry-client.ts's onDataReady progressive
enhancement), FILE_NOTES/FILE_NOTE_OVERRIDES for page.ts and the enhancement-only
entry-client.ts note, and export FRAMEWORKS/SHARED_PINS so the test matrices and
pins can derive from them instead of hand-transcribing the framework list.

React, Vue and Solid output is unchanged - verified byte-identical against a
pre-edit planFiles() capture.
…d matrix

Add cli-html.test.ts, mirroring cli-solid.test.ts: the built CLI accepts
--framework=html and names it as valid, taujs.config.ts declares
renderer: htmlRenderer() with no active plugins: entry, package.json declares
no Vite plugin and no framework runtime dependency while externalising
@taujs/html, tsconfig.json carries no jsx key, entry-server.ts wires
createRenderer to renderPage, entry-client.ts enhances the server-rendered
card in place (four separate assertions), page.ts escapes every interpolation,
and the README links MDN and lists page.ts.

Gain html by hand in every hard-coded framework matrix: generate.test.ts and
cli-solid.test.ts now read the exported FRAMEWORKS constant, pins.test.ts reads
packages/html/package.json and asserts html declares no Vite plugin and no
framework runtime dependency, and lifecycle.test.ts's PACKABLE list and
describe.each gain @taujs/html and its slice-6 lifecycle branch - including a
production /streaming request proving both generated routes stream, in order,
with exactly one bootstrap tag ahead of the data script.
Correct every place the page names the renderer set (the frontmatter
description, the intro sentence, the framework-choice wording) and the
prerequisites claim that every scaffold pins a renderer plugin - plain HTML
ships none. Add the @taujs/html row to the peer table.
@aoede3
aoede3 merged commit bcbc618 into main Sep 7, 2026
2 checks passed
@aoede3
aoede3 deleted the feat/create-taujs-html branch September 7, 2026 16:39
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
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