No Description

Ynats 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
.github 48776bcb6e feat: Add main entry point and routing for the application 2 months ago
.specstory 856e996e49 feat: Remplacer les boutons de type de tuile par des checkboxes radio et ajouter la gestion des SVG associés 2 months ago
app 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
archives 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
config 3450f87995 feat: Add project listing view and related functionalities 2 months ago
docs f9268f8f10 feat(migrations): add initial map table and indexes 2 months ago
logs 394be874b0 Refactor deleteMap function to streamline modal handling and remove fallback confirmation logic; add favicon; normalize URI in index.php; delete multiple map JSON files; add new map JSON file; create unit tests for MapModel with CRUD operations and statistics retrieval. 2 months ago
mapModels 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
migrations f9268f8f10 feat(migrations): add initial map table and indexes 2 months ago
public 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
routes 902298b836 feat: Implement project editing functionality with template support 2 months ago
storage 94dcc63a7c feat: Enhance map generation with tile definitions and hexagon data 1 month ago
tests 394be874b0 Refactor deleteMap function to streamline modal handling and remove fallback confirmation logic; add favicon; normalize URI in index.php; delete multiple map JSON files; add new map JSON file; create unit tests for MapModel with CRUD operations and statistics retrieval. 2 months ago
DIAGNOSTIC.md 04d951971a feat: Add diagnostic guides and resolve map loading issues 2 months ago
GUIDE-DIAGNOSTIC.md 04d951971a feat: Add diagnostic guides and resolve map loading issues 2 months ago
README.md 3d6a18306a feat: Réorganiser la structure des fichiers JS, ajouter des tests unitaires et améliorer le chargement des scripts 2 months ago
RESOLUTION-PROBLEME.md 04d951971a feat: Add diagnostic guides and resolve map loading issues 2 months ago
jest.config.cjs 3d6a18306a feat: Réorganiser la structure des fichiers JS, ajouter des tests unitaires et améliorer le chargement des scripts 2 months ago
package.json 3d6a18306a feat: Réorganiser la structure des fichiers JS, ajouter des tests unitaires et améliorer le chargement des scripts 2 months ago
server.log 4093d6906a feat: Enhance dropdown behavior and add asset diagnostic page 2 months ago
temp.css 394be874b0 Refactor deleteMap function to streamline modal handling and remove fallback confirmation logic; add favicon; normalize URI in index.php; delete multiple map JSON files; add new map JSON file; create unit tests for MapModel with CRUD operations and statistics retrieval. 2 months ago
test_sidebar.php d469fcfee6 feat: Ajouter un système dynamique de chargement des types de tuiles avec illustrations SVG et mise à jour des données de carte 2 months ago

README.md

Map Generator — Chargement des scripts et tests

Résumé rapide

  • Le projet charge Bootstrap (bundle) puis un petit loader qui injecte les scripts JS organisés dans public/assets/js.

Ordre recommandé de chargement (actuel)

  1. bundle de dépendances (Bootstrap JS) — inclus via CDN ou assets
  2. /assets/js/core/dom-ready.js — expose window.MG.domReady
  3. /assets/js/core/geom.js — expose window.MG.geom (axialToPixel, computeZoom, computePanOffset)
  4. /assets/js/ui/header.js — interactions de l'en-tête
  5. /assets/js/editor/map-editor.js — éditeur de carte (utilise window.MG)

Notes

  • Les helpers sont exposés sur window.MG pour éviter les problèmes d'absence de bundler.
  • Le loader actuel est un script simple qui insère les fichiers dans l'ordre. Pour un projet JavaScript plus gros, il est recommandé d'utiliser un bundler (Vite, Webpack ou Rollup). Avantages: tree-shaking, modules ES, meilleure gestion des dépendances, sourcemaps et tests plus simples.

Exécution des tests unitaires JS

  1. Installer les dépendances dev: npm install
  2. Lancer les tests: npm test

Prochaines améliorations possibles

  • Migrer les fichiers JS vers modules ES et ajouter un build step (Vite recommandé pour dev rapide).
  • Ajouter tests pour les interactions DOM (jest + testing-library) et tests e2e si nécessaire.