mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 06:04:23 +03:00
Remove final todos from elm-codegen migration.
This commit is contained in:
parent
72f1da671a
commit
f4a1417425
@ -27,6 +27,7 @@ import Gen.Pages.Flags
|
|||||||
import Gen.Pages.FormState
|
import Gen.Pages.FormState
|
||||||
import Gen.Pages.Internal.NotFoundReason
|
import Gen.Pages.Internal.NotFoundReason
|
||||||
import Gen.Pages.Internal.Platform
|
import Gen.Pages.Internal.Platform
|
||||||
|
import Gen.Pages.Internal.Platform.Cli
|
||||||
import Gen.Pages.Internal.RoutePattern
|
import Gen.Pages.Internal.RoutePattern
|
||||||
import Gen.Pages.Msg
|
import Gen.Pages.Msg
|
||||||
import Gen.Pages.ProgramConfig
|
import Gen.Pages.ProgramConfig
|
||||||
@ -406,7 +407,22 @@ otherFile routes phaseString =
|
|||||||
Elm.list []
|
Elm.list []
|
||||||
|
|
||||||
Cli ->
|
Cli ->
|
||||||
todo
|
Elm.apply
|
||||||
|
(route
|
||||||
|
|> routeTemplateFunction "head"
|
||||||
|
)
|
||||||
|
[ Elm.record
|
||||||
|
[ ( "data", data )
|
||||||
|
, ( "sharedData", globalData )
|
||||||
|
, ( "routeParams", maybeRouteParams |> Maybe.withDefault (Elm.record []) )
|
||||||
|
, ( "action", Elm.nothing )
|
||||||
|
, ( "path", page |> Elm.get "path" )
|
||||||
|
, ( "submit", Elm.functionReduced "value" (Gen.Pages.Fetcher.call_.submit (decodeRouteType "ActionData" route)) )
|
||||||
|
, ( "transition", Elm.nothing )
|
||||||
|
, ( "fetchers", Gen.Dict.empty )
|
||||||
|
, ( "pageFormState", Gen.Dict.empty )
|
||||||
|
]
|
||||||
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -440,13 +456,7 @@ otherFile routes phaseString =
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
, ( "head"
|
, ( "head"
|
||||||
, case phase of
|
, Elm.list []
|
||||||
Browser ->
|
|
||||||
Elm.list []
|
|
||||||
|
|
||||||
Cli ->
|
|
||||||
todo
|
|
||||||
-- TODO check for browser/cli flag in JS code for other TODOs
|
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -1571,7 +1581,7 @@ otherFile routes phaseString =
|
|||||||
(Elm.value
|
(Elm.value
|
||||||
{ annotation = Nothing
|
{ annotation = Nothing
|
||||||
, importFrom = [ "ErrorPage" ]
|
, importFrom = [ "ErrorPage" ]
|
||||||
, name = "w3_encode_Data"
|
, name = "w3_encode_ErrorPage"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
[ thisPageData ]
|
[ thisPageData ]
|
||||||
@ -2080,9 +2090,16 @@ otherFile routes phaseString =
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
, Gen.Pages.Internal.Platform.application config.reference
|
, case phase of
|
||||||
|> Elm.declaration "main"
|
Browser ->
|
||||||
|> expose
|
Gen.Pages.Internal.Platform.application config.reference
|
||||||
|
|> Elm.declaration "main"
|
||||||
|
|> expose
|
||||||
|
|
||||||
|
Cli ->
|
||||||
|
Gen.Pages.Internal.Platform.Cli.cliApplication config.reference
|
||||||
|
|> Elm.declaration "main"
|
||||||
|
|> expose
|
||||||
, config.declaration
|
, config.declaration
|
||||||
, dataForRoute.declaration
|
, dataForRoute.declaration
|
||||||
, toTriple.declaration
|
, toTriple.declaration
|
||||||
|
Loading…
Reference in New Issue
Block a user