reduce the filesize of the map; try to optimise the compiled js

This commit is contained in:
Christian Lawson-Perfect 2025-05-11 09:13:28 +00:00
parent e6c92a3edf
commit db4119c5a9
3 changed files with 13 additions and 7516 deletions

View file

@ -3,7 +3,7 @@ DIRNAME=$(notdir $(CURDIR))
ELMS=$(wildcard src/*.elm)
app.js: src/App.elm $(ELMS)
-elm make $< --output=$@ 2> error.txt
-elm make --optimize $< --output=$@ 2> error.txt
@cat error.txt
upload: app.js index.html style.css

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Before After
Before After

View file

@ -267,7 +267,7 @@ init_model flags =
|> JD.decodeValue decode_flags
|> (\r -> case r of
Ok flagdata -> { blank_model | stations = flagdata.stations, lines = flagdata.lines, current_station = Just flagdata.station }
Err err -> { blank_model | error = Just (Debug.log "error" err) }
Err err -> { blank_model | error = Just err }
)
nocmd model = (model, Cmd.none)
@ -290,7 +290,7 @@ update msg model = case msg of
ReceiveLocation data ->
case JD.decodeValue (decode_geolocation) data of
Err err -> {model | error = Just (Debug.log "err" err) } |> nocmd
Err err -> {model | error = Just err } |> nocmd
Ok latlon ->
let
closest_stations = geo_closest_stations model latlon