mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-24 12:22:27 +03:00
Include View and Effect modules in elm-application.json, and include @docs comments to make them valid.
This commit is contained in:
parent
23cc852ecb
commit
67af0e53d0
@ -1,4 +1,10 @@
|
||||
module Effect exposing (Effect(..), batch, fromCmd, map, none, perform)
|
||||
module Effect exposing (Effect(..), none, batch, fromCmd, map, perform)
|
||||
|
||||
{-|
|
||||
|
||||
@docs Effect, none, batch, fromCmd, map, perform
|
||||
|
||||
-}
|
||||
|
||||
import Browser.Navigation
|
||||
import Form.FormData exposing (FormData)
|
||||
@ -8,6 +14,7 @@ import Pages.Fetcher
|
||||
import Url exposing (Url)
|
||||
|
||||
|
||||
{-| -}
|
||||
type Effect msg
|
||||
= None
|
||||
| Cmd (Cmd msg)
|
||||
@ -31,21 +38,25 @@ type alias RequestInfo =
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
none : Effect msg
|
||||
none =
|
||||
None
|
||||
|
||||
|
||||
{-| -}
|
||||
batch : List (Effect msg) -> Effect msg
|
||||
batch =
|
||||
Batch
|
||||
|
||||
|
||||
{-| -}
|
||||
fromCmd : Cmd msg -> Effect msg
|
||||
fromCmd =
|
||||
Cmd
|
||||
|
||||
|
||||
{-| -}
|
||||
map : (a -> b) -> Effect a -> Effect b
|
||||
map fn effect =
|
||||
case effect of
|
||||
@ -82,6 +93,7 @@ map fn effect =
|
||||
|> SubmitFetcher
|
||||
|
||||
|
||||
{-| -}
|
||||
perform :
|
||||
{ fetchRouteData :
|
||||
{ data : Maybe FormData
|
||||
|
@ -1,14 +1,22 @@
|
||||
module View exposing (View, map, placeholder)
|
||||
|
||||
{-|
|
||||
|
||||
@docs View, map, placeholder
|
||||
|
||||
-}
|
||||
|
||||
import Html exposing (Html)
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias View msg =
|
||||
{ title : String
|
||||
, body : List (Html msg)
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
map : (msg1 -> msg2) -> View msg1 -> View msg2
|
||||
map fn doc =
|
||||
{ title = doc.title
|
||||
@ -16,6 +24,7 @@ map fn doc =
|
||||
}
|
||||
|
||||
|
||||
{-| -}
|
||||
placeholder : String -> View msg
|
||||
placeholder moduleName =
|
||||
{ title = "Placeholder - " ++ moduleName
|
||||
|
@ -1,8 +1,11 @@
|
||||
{
|
||||
"name": "dmy/elm-doc-preview",
|
||||
"summary": "Offline documentation previewer",
|
||||
"version": "5.0.0",
|
||||
"name": "user/elm-pages-local",
|
||||
"summary": "elm-pages local generated module documentation",
|
||||
"version": "1.0.0",
|
||||
"exposed-modules": [
|
||||
"Page"
|
||||
"RouteBuilder",
|
||||
"View",
|
||||
"Effect",
|
||||
"Route"
|
||||
]
|
||||
}
|
@ -4,6 +4,8 @@
|
||||
"version": "1.0.0",
|
||||
"exposed-modules": [
|
||||
"RouteBuilder",
|
||||
"View",
|
||||
"Effect",
|
||||
"Route"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user