mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 22:26:16 +03:00
Add setup for elm-doc-preview.
This commit is contained in:
parent
735bdeb2af
commit
5635566712
1
examples/slides/README.md
Normal file
1
examples/slides/README.md
Normal file
@ -0,0 +1 @@
|
||||
# README
|
8
examples/slides/elm-application.json
Normal file
8
examples/slides/elm-application.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "dmy/elm-doc-preview",
|
||||
"summary": "Offline documentation previewer",
|
||||
"version": "5.0.0",
|
||||
"exposed-modules": [
|
||||
"Page"
|
||||
]
|
||||
}
|
@ -1,10 +1,9 @@
|
||||
module Page exposing
|
||||
( Builder(..)
|
||||
, StaticPayload
|
||||
, StaticPayload, DynamicContext
|
||||
, prerenderedRoute, singleRoute, serverlessRoute
|
||||
, Page, buildNoState
|
||||
, PageWithState, buildWithLocalState, buildWithSharedState
|
||||
, DynamicContext
|
||||
)
|
||||
|
||||
{-|
|
||||
@ -19,7 +18,7 @@ module Page exposing
|
||||
|
||||
Every template will have access to a `StaticPayload`.
|
||||
|
||||
@docs StaticPayload
|
||||
@docs StaticPayload, DynamicContext
|
||||
|
||||
Since this data is _static_, you have access to it before the user has loaded the page, including at build time.
|
||||
An example of dynamic data would be keyboard input from the user, query params, or any other data that comes from the app running in the browser.
|
||||
@ -207,6 +206,7 @@ buildWithSharedState config builderState =
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
singleRoute :
|
||||
{ data : DataSource data
|
||||
, head : StaticPayload data {} -> List Head.Tag
|
||||
@ -222,6 +222,7 @@ singleRoute { data, head } =
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
prerenderedRoute :
|
||||
{ data : routeParams -> DataSource data
|
||||
, routes : DataSource (List routeParams)
|
||||
@ -255,6 +256,7 @@ serverlessRoute { data, head, routeFound } =
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
type RouteFound
|
||||
= Found
|
||||
-- TODO other status codes, like 403?
|
||||
|
Loading…
Reference in New Issue
Block a user