Split the game page into partials under src/, assembled into one index.html at build

site/index.html (900 KB of HTML, CSS and JS in one file) becomes src/: a shell
(src/index.html), styles/ and game/, concatenated in path order by
scripts/lib/page.js. The assembled page is byte-identical to the old file, so
load time and in-game performance are unchanged.

- scripts/build.js replaces build.sh (same env vars, same output)
- npm run dev: a zero-dependency dev server that assembles on every request
- tests assemble the page in memory; npm test runs every tests/*.test.js
- perf-bench takes --base-ref to build a git ref's page
- scripts/legacy/split-index-html.js is the splitter, kept for older branches
This commit is contained in:
Frederic Jung 2026-10-27 10:05:56 +01:00
parent 295e68cc46
commit 67a40942b4
No known key found for this signature in database
113 changed files with 5584 additions and 5195 deletions

View file

@ -0,0 +1 @@
const CITY_LL={"chc":[172.55,-43.53],"ivc":[168.35,-46.41],"adl":[138.6,-34.93],"cbr":[149.13,-35.28],"hba":[147.25,-42.85],"hfx":[-63.62,44.68],"bda":[-64.78,32.29],"pdl":[-25.67,37.74],"tci":[-16.3,28.44],"rai":[-23.55,14.98],"jam":[-5.72,-15.93],"man":[-2.24,53.48],"edi":[-3.19,55.95],"bde":[-4.54,50.83],"svg":[5.73,58.97],"bcn":[2.17,41.39],"mil":[9.19,45.46],"rom":[12.5,41.9],"pmo":[13.36,38.12],"lis":[-9.14,38.72],"ath":[23.73,37.98],"atn":[-84.39,33.75],"den":[-104.99,39.74],"phx":[-112.07,33.45],"bos":[-71.06,42.36],"hou":[-95.37,29.76],"slc":[-111.89,40.76],"jed":[39.25,21.55],"ruh":[46.72,24.71],"doh":[51.45,25.28],"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bsb":[-47.88,-15.79],"bhz":[-43.94,-19.92],"cwb":[-49.27,-25.43],"poa":[-51.23,-30.03],"aju":[-37.07,-10.91],"bel":[-48.5,-1.46],"bvb":[-60.67,2.82],"cac":[-53.46,-24.96],"cpv":[-35.88,-7.23],"cpq":[-47.06,-22.91],"cgr":[-54.65,-20.47],"cau":[-35.98,-8.28],"cgb":[-56.1,-15.6],"cxj":[-51.18,-29.17],"fec":[-38.97,-12.27],"fln":[-48.55,-27.6],"igu":[-54.59,-25.55],"gyn":[-49.25,-16.69],"jpa":[-34.86,-7.12],"ljd":[-51.96,-29.47],"ldb":[-51.16,-23.31],"mcp":[-51.07,0.03],"mcz":[-35.74,-9.67],"mao":[-60.02,-3.12],"mgf":[-51.94,-23.42],"nat":[-35.21,-5.79],"pmw":[-48.33,-10.18],"pvh":[-63.9,-8.76],"rao":[-47.81,-21.18],"rec":[-34.88,-8.05],"rbr":[-67.81,-9.97],"ssa":[-38.5,-12.97],"ria":[-53.81,-29.68],"sjp":[-49.38,-20.81],"slz":[-44.3,-2.53],"the":[-42.8,-5.09],"vix":[-40.31,-20.32],"mvd":[-56.16,-34.9],"asu":[-57.58,-25.26],"cor":[-64.18,-31.42],"lpb":[-68.15,-16.5],"uio":[-78.47,-0.18],"mde":[-75.57,6.24],"ccs":[-66.9,10.49],"gua":[-90.51,14.63],"sjo":[-84.09,9.93],"qro":[-100.39,20.59],"mty":[-100.31,25.69],"gdl":[-103.35,20.67],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"dkr":[-17.45,14.69],"abj":[-4.03,5.32],"acc":[-0.19,5.6],"dla":[9.7,4.05],"fih":[15.27,-4.33],"lad":[13.23,-8.84],"cas":[-7.59,33.57],"alg":[3.06,36.75],"tun":[10.18,36.81],"jib":[43.15,11.59],"add":[38.75,9.03],"mba":[39.67,-4.04],"dar":[39.28,-6.79],"kla":[32.58,0.35],"kgl":[30.06,-1.95],"mpm":[32.57,-25.97],"dur":[31.03,-29.86],"wdh":[17.08,-22.56],"lun":[28.32,-15.39],"hre":[31.05,-17.83],"gbe":[25.91,-24.65],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"kcy":[-94.58,39.1],"cal":[-114.07,51.05],"van":[-123.12,49.28],"ott":[-75.7,45.42],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"bru":[4.35,50.85],"oos":[3.23,51.15],"bet":[6.1,49.52],"fra":[8.68,50.11],"ham":[9.99,53.55],"dus":[6.78,51.22],"muc":[11.58,48.14],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85],"hnl":[-157.86,21.31],"gum":[144.75,13.47],"ror":[134.48,7.34],"maj":[171.38,7.09],"pom":[147.18,-9.44],"hir":[159.95,-9.43],"nou":[166.46,-22.27],"suv":[178.44,-18.14],"tbu":[-175.2,-21.14],"apw":[-171.76,-13.83],"ppg":[-170.7,-14.28],"ppt":[-149.57,-17.53]};