mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-23 11:55:41 +03:00
Rename DataSource.Port.send -> DataSource.Port.get.
This commit is contained in:
parent
63667f3e65
commit
731bea779b
@ -18,7 +18,7 @@ type alias Timestamps =
|
||||
|
||||
data : String -> DataSource Timestamps
|
||||
data filePath =
|
||||
DataSource.Port.send "gitTimestamps"
|
||||
DataSource.Port.get "gitTimestamps"
|
||||
(Json.Encode.string filePath)
|
||||
(Decode.string
|
||||
|> Decode.map (String.trim >> String.split "\n")
|
||||
|
@ -1,8 +1,8 @@
|
||||
module DataSource.Port exposing (send)
|
||||
module DataSource.Port exposing (get)
|
||||
|
||||
{-|
|
||||
|
||||
@docs send
|
||||
@docs get
|
||||
|
||||
-}
|
||||
|
||||
@ -74,8 +74,8 @@ prefer to add ANSI color codes within the error string in an exception and it wi
|
||||
As with any JavaScript or NodeJS code, avoid doing blocking IO operations. For example, avoid using `fs.readFileSync`, because blocking IO can slow down your elm-pages builds and dev server.
|
||||
|
||||
-}
|
||||
send : String -> Json.Encode.Value -> Decoder b -> DataSource.DataSource b
|
||||
send portName input decoder =
|
||||
get : String -> Json.Encode.Value -> Decoder b -> DataSource.DataSource b
|
||||
get portName input decoder =
|
||||
DataSource.Http.request
|
||||
(Secrets.succeed
|
||||
{ url = "port://" ++ portName
|
||||
|
Loading…
Reference in New Issue
Block a user