mirror of
https://github.com/ryan-haskell/elm-spa.git
synced 2024-11-22 03:12:01 +03:00
update docs
This commit is contained in:
parent
d12d183889
commit
797e44e793
33
examples/elm-spa-dev/package-lock.json
generated
33
examples/elm-spa-dev/package-lock.json
generated
@ -467,10 +467,13 @@
|
||||
}
|
||||
},
|
||||
"elm-spa": {
|
||||
"version": "5.0.0-rc8",
|
||||
"resolved": "https://registry.npmjs.org/elm-spa/-/elm-spa-5.0.0-rc8.tgz",
|
||||
"integrity": "sha512-VqJhZ8KbE6i+X3rh3Wzo70GsWtf/zQekQJr47NRJ5fDE82n63WmOpKMB8rleHhvnPPhjZZbF5JHmHXbU+xJlEw==",
|
||||
"dev": true
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/elm-spa/-/elm-spa-5.0.1.tgz",
|
||||
"integrity": "sha512-z7sEq7SiQwViSao9Tzho4DW2A9avtce/ns2W8u7HnLfekHHyDSUJzIqrfoA5NeoDfszD6l5N9z2BJmDbn3ypQw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prompts": "2.3.2"
|
||||
}
|
||||
},
|
||||
"elm-test": {
|
||||
"version": "0.19.1-revision2",
|
||||
@ -1238,6 +1241,12 @@
|
||||
"verror": "1.10.0"
|
||||
}
|
||||
},
|
||||
"kleur": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
|
||||
"dev": true
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
|
||||
@ -1691,6 +1700,16 @@
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"dev": true
|
||||
},
|
||||
"prompts": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz",
|
||||
"integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kleur": "^3.0.3",
|
||||
"sisteransi": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
@ -1940,6 +1959,12 @@
|
||||
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
|
||||
"dev": true
|
||||
},
|
||||
"sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
|
||||
"dev": true
|
||||
},
|
||||
"spdx-correct": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
|
||||
|
@ -46,13 +46,13 @@ init : Flags -> Url -> Nav.Key -> ( Model, Cmd Msg )
|
||||
init flags url key =
|
||||
let
|
||||
shared =
|
||||
Shared.init flags key
|
||||
Shared.init flags key url
|
||||
|
||||
route =
|
||||
fromUrl url
|
||||
|
||||
( page, pageCmd ) =
|
||||
Pages.init route shared key url
|
||||
Pages.init route shared
|
||||
in
|
||||
( Model url key shared page { layout = True, page = True } url
|
||||
, Cmd.batch
|
||||
@ -134,7 +134,7 @@ loadPage url model =
|
||||
fromUrl url
|
||||
|
||||
( page, cmd ) =
|
||||
Pages.init route model.shared model.key url
|
||||
Pages.init route model.shared
|
||||
|
||||
shared =
|
||||
Pages.save page model.shared
|
||||
|
@ -15,6 +15,7 @@ import Html.Attributes exposing (class, classList, href, style)
|
||||
import Spa.Document exposing (Document)
|
||||
import Spa.Generated.Route as Route exposing (Route)
|
||||
import Spa.Transition
|
||||
import Url exposing (Url)
|
||||
|
||||
|
||||
type alias Flags =
|
||||
@ -23,12 +24,13 @@ type alias Flags =
|
||||
|
||||
type alias Model =
|
||||
{ key : Nav.Key
|
||||
, url : Url
|
||||
}
|
||||
|
||||
|
||||
init : Flags -> Nav.Key -> Model
|
||||
init _ key =
|
||||
Model key
|
||||
init : Flags -> Nav.Key -> Url -> Model
|
||||
init _ key url =
|
||||
Model key url
|
||||
|
||||
|
||||
type Msg
|
||||
|
Loading…
Reference in New Issue
Block a user