Generate the shared head of each game's index.html at build time
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- html, typescript, vite
- Área
- build-system
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 3
- Forks
- 3
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TMHSDigital/GH-Arcade
-
enhancement good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TMHSDigital/GH-Arcade#50 ·
-
enhancement good first issue severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
TMHSDigital/GH-Arcade#47 ·
-
documentation good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/GH-Arcade#34 ·
-
documentation good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/GH-Arcade#33 ·
-
dependencies good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/GH-Arcade#27 ·
Todos los issues de TMHSDigital/GH-Arcade
Issues similares
-
automated-triage type/bug type/ci
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
📦 expo-router Android contributor: external needs review sdk-58 severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
expo/expo#53436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Translate the READMEAbiertodocumentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
asasemahmed/openboard#68 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Document PowerShell shell semantics and read-only Bash deduplication in Built-in Tools referenceAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100