Renamed to ryan-haskell/elm-spa. It is published under that name, and new versions come out there.
Versions published as ryannhg/elm-spa still install under that name. 13 versions of 13 come from the new location (see their notes).
Rerouted (fork, verified). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/tuohy/elm-spa (a fork).
What we checked: Rebuilt with git archive from commit 292236b2582f of https://github.com/tuohy/elm-spa (a fork) (zip prefix ryannhg-elm-spa-8ee73bf/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 597d34671fca0206517a1cd488d425f4f335b10f.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/ryannhg/elm-spa/zipball/1.0.0/
Application.create replaces Browser.application
as the entrypoint to your app.
module Main exposing (main)
import Application
import Generated.Pages as Pages
import Generated.Route as Route
import Global
main =
Application.create
{ ui = Application.usingHtml
, routing =
{ routes = Route.routes
, toPath = Route.toPath
, notFound = Route.NotFound ()
}
, global =
{ init = Global.init
, update = Global.update
, subscriptions = Global.subscriptions
}
, page = Pages.page
}Creates a new Program given some one-time configuration:
ui - How do we convert the view to Html msg?routing - What are the app's routes?global - How do we manage shared state between pages?page - What pages do we have available?If you're a fan of mdgriffith/elm-ui,
it's important to support using Element msg instead of Html msg for your pages and components.
Let Application.create know about this by passing in your own Options like these:
import Element
-- other imports
Application.create
{ ui =
{ toHtml = Element.layout []
, map = Element.map
}
, -- ... the rest of your app
}Pass this in when calling Application.create
( It will work if your view returns the standard Html msg )
An alias for
Platform.Programto make annotations a little more clear.