Generate the shared head of each game's index.html at build time
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- html, typescript, vite
- Ambito
- build-system
Direzione di ricerca
Read vite.config.ts and compare games/_template/index.html with games/snake/index.html; check how games/registry.json stores each title. Start by tracing the Vite build entry points, then add the suggested build test for every game's built page. Done means the shared head is defined once and the built pages retain their titles, icon links and font stylesheet.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Each game's index.html repeats the same viewport, theme colour, icon links, font preconnect and stylesheet, back link, loader and script tag. Only the title differs, and the title is also in the registry.
Where
games/_template/index.html:1-20,games/snake/index.html:7vite.config.ts:10-19
Details
The template and Snake were compared line by line; the others are the same length and were sampled.
Impact
Any head change (font swap, manifest link, meta description, a CSP tag) is an eleven-file edit that can drift.
Suggested fix
Add a small Vite transformIndexHtml plugin that injects the shared head tags and the title from games/registry.json, and reduce each game's index.html to the body. Cover it with a build test asserting each built page has the title, icon link and font stylesheet.
Acceptance criteria
- Shared head tags are defined in one place
- Built pages are unchanged
Getting started
- Relevant files:
games/_template/index.html,vite.config.ts - Run locally:
npm install, thennpm run dev - Checks:
npm run typecheckandnpm run build(there is no test suite yet) - Related docs:
README.md
Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: S. audit-key: tech-debt|games/_template/index.html|head
- Lingua principale
- TypeScript
- Stelle
- 3
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TMHSDigital/GH-Arcade
-
enhancement good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TMHSDigital/GH-Arcade#50 ·
-
enhancement good first issue severity: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
TMHSDigital/GH-Arcade#47 ·
-
documentation good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/GH-Arcade#34 ·
-
documentation good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/GH-Arcade#33 ·
-
dependencies good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
TMHSDigital/GH-Arcade#27 ·
Tutte le issue di TMHSDigital/GH-Arcade
Issue simili
-
automated-triage type/bug type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
📦 expo-router Android contributor: external needs review sdk-58 severity: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
expo/expo#53436 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Translate the READMEApertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
asasemahmed/openboard#68 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Document PowerShell shell semantics and read-only Bash deduplication in Built-in Tools referenceApertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100