mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 06:05:31 +03:00
Remove unused code.
This commit is contained in:
parent
50e81ca5de
commit
8f4491adf0
@ -44,7 +44,6 @@ plain old JSON in Elm.
|
||||
|
||||
import DataSource exposing (DataSource)
|
||||
import DataSource.Http
|
||||
import DataSource.Internal.Glob
|
||||
import Json.Decode as Decode exposing (Decoder)
|
||||
|
||||
|
||||
|
@ -1,23 +1,13 @@
|
||||
module Pages.ContentCache exposing
|
||||
( ContentCache
|
||||
, ContentJson
|
||||
, Entry(..)
|
||||
( Entry(..)
|
||||
, Path
|
||||
, init
|
||||
, pathForUrl
|
||||
)
|
||||
|
||||
import Dict exposing (Dict)
|
||||
import Pages.Internal.NotFoundReason
|
||||
import Pages.Internal.String as String
|
||||
import RequestsAndPending exposing (RequestsAndPending)
|
||||
import Url exposing (Url)
|
||||
|
||||
|
||||
type alias ContentCache =
|
||||
Dict Path Entry
|
||||
|
||||
|
||||
type Entry
|
||||
= Parsed
|
||||
|
||||
@ -26,26 +16,6 @@ type alias Path =
|
||||
List String
|
||||
|
||||
|
||||
init :
|
||||
Maybe ( Path, ContentJson )
|
||||
-> ContentCache
|
||||
init maybeInitialPageContent =
|
||||
case maybeInitialPageContent of
|
||||
Nothing ->
|
||||
Dict.empty
|
||||
|
||||
Just ( urls, _ ) ->
|
||||
Dict.singleton urls Parsed
|
||||
|
||||
|
||||
type alias ContentJson =
|
||||
{ staticData : RequestsAndPending
|
||||
, is404 : Bool
|
||||
, path : Maybe String
|
||||
, notFoundReason : Maybe Pages.Internal.NotFoundReason.Payload
|
||||
}
|
||||
|
||||
|
||||
pathForUrl : { currentUrl : Url, basePath : List String } -> Path
|
||||
pathForUrl { currentUrl, basePath } =
|
||||
currentUrl.path
|
||||
|
@ -12,7 +12,6 @@ import Html
|
||||
import Http
|
||||
import Json.Decode as JD exposing (Decoder)
|
||||
import Json.Encode as Encode
|
||||
import Pages.ContentCache as ContentCache exposing (ContentCache)
|
||||
import Pages.Internal.NotFoundReason
|
||||
import Pages.Internal.Platform.Cli exposing (..)
|
||||
import Pages.Internal.Platform.Effect as Effect exposing (Effect)
|
||||
@ -26,11 +25,9 @@ import Path
|
||||
import ProgramTest exposing (ProgramTest)
|
||||
import Regex
|
||||
import RenderRequest
|
||||
import Server.Request
|
||||
import Server.Response as Response
|
||||
import SimulatedEffect.Cmd
|
||||
import SimulatedEffect.Ports
|
||||
import SimulatedEffect.Sub
|
||||
import SimulatedEffect.Task
|
||||
import Task
|
||||
import Test exposing (Test, describe, test)
|
||||
@ -1019,7 +1016,7 @@ simulateEffects effect =
|
||||
Effect.Continue ->
|
||||
SimulatedEffect.Cmd.none
|
||||
|
||||
Effect.SendSinglePageNew done bytes toJsSuccessPayloadNewCombined ->
|
||||
Effect.SendSinglePageNew done _ toJsSuccessPayloadNewCombined ->
|
||||
SimulatedEffect.Cmd.batch
|
||||
[ toJsSuccessPayloadNewCombined
|
||||
|> Codec.encoder (ToJsPayload.successCodecNew2 "" "")
|
||||
|
Loading…
Reference in New Issue
Block a user