mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 06:54:03 +03:00
Seperate test scripts into 3 different scripts.
This commit is contained in:
parent
1c746bef8d
commit
11c5897737
@ -1,51 +0,0 @@
|
||||
module Hello exposing (run)
|
||||
|
||||
import DataSource
|
||||
import DataSource.Http
|
||||
import Json.Decode as Decode
|
||||
import Pages.Script as Script exposing (Script)
|
||||
|
||||
|
||||
run : Script
|
||||
run =
|
||||
--Script.withoutCliOptions
|
||||
-- (Script.log "-> 1"
|
||||
-- |> DataSource.andThen
|
||||
-- (\_ ->
|
||||
-- Script.log "-> 2"
|
||||
-- |> DataSource.andThen
|
||||
-- (\_ ->
|
||||
-- -- let
|
||||
-- -- _ =
|
||||
-- -- Debug.log "___3___" ()
|
||||
-- -- in
|
||||
-- Script.log "-> 3"
|
||||
-- |> DataSource.andThen
|
||||
-- (\_ ->
|
||||
-- --DataSource.Http.get
|
||||
-- -- "https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
-- -- (Decode.field "stargazers_count" Decode.int)
|
||||
-- -- |> DataSource.andThen
|
||||
-- -- (\stars ->
|
||||
-- -- Script.log (String.fromInt stars)
|
||||
-- -- )
|
||||
-- Script.log "-> 4"
|
||||
-- )
|
||||
-- )
|
||||
-- )
|
||||
-- )
|
||||
Script.withoutCliOptions
|
||||
(Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
23
examples/end-to-end/script/src/RepeatLog.elm
Normal file
23
examples/end-to-end/script/src/RepeatLog.elm
Normal file
@ -0,0 +1,23 @@
|
||||
module RepeatLog exposing (run)
|
||||
|
||||
import DataSource
|
||||
import Pages.Script as Script exposing (Script)
|
||||
|
||||
|
||||
run : Script
|
||||
run =
|
||||
Script.withoutCliOptions
|
||||
(Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 1"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
31
examples/end-to-end/script/src/SequenceHttpLog.elm
Normal file
31
examples/end-to-end/script/src/SequenceHttpLog.elm
Normal file
@ -0,0 +1,31 @@
|
||||
module SequenceHttpLog exposing (run)
|
||||
|
||||
import DataSource
|
||||
import DataSource.Http
|
||||
import Json.Decode as Decode
|
||||
import Pages.Script as Script exposing (Script)
|
||||
|
||||
|
||||
run : Script
|
||||
run =
|
||||
Script.withoutCliOptions
|
||||
(Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 2"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 3"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
DataSource.Http.get
|
||||
"https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
(Decode.field "stargazers_count" Decode.int)
|
||||
|> DataSource.andThen
|
||||
(\stars ->
|
||||
Script.log (String.fromInt stars)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
25
examples/end-to-end/script/src/SequenceLog.elm
Normal file
25
examples/end-to-end/script/src/SequenceLog.elm
Normal file
@ -0,0 +1,25 @@
|
||||
module SequenceLog exposing (run)
|
||||
|
||||
import DataSource
|
||||
import DataSource.Http
|
||||
import Json.Decode as Decode
|
||||
import Pages.Script as Script exposing (Script)
|
||||
|
||||
|
||||
run : Script
|
||||
run =
|
||||
Script.withoutCliOptions
|
||||
(Script.log "-> 1"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 2"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 3"
|
||||
|> DataSource.andThen
|
||||
(\_ ->
|
||||
Script.log "-> 4"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user