mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-24 12:22:27 +03:00
Move value to let.
This commit is contained in:
parent
34f12fa475
commit
2d86d57800
@ -172,6 +172,49 @@ otherFile routes phaseString =
|
||||
(Type.named [ "ErrorPage" ] "ErrorPage")
|
||||
)
|
||||
|> topLevelValue "config"
|
||||
|
||||
globalHeadTags :
|
||||
{ declaration : Elm.Declaration
|
||||
, reference : Elm.Expression
|
||||
, referenceFrom : List String -> Elm.Expression
|
||||
}
|
||||
globalHeadTags =
|
||||
topLevelValue "globalHeadTags"
|
||||
(Elm.Op.cons
|
||||
(Elm.value
|
||||
{ importFrom = [ "Site" ]
|
||||
, annotation = Nothing
|
||||
, name = "config"
|
||||
}
|
||||
|> Elm.get "head"
|
||||
)
|
||||
(Elm.apply
|
||||
(Elm.value
|
||||
{ importFrom = [ "Api" ]
|
||||
, annotation = Nothing
|
||||
, name = "routes"
|
||||
}
|
||||
)
|
||||
[ getStaticRoutes.reference
|
||||
, Gen.HtmlPrinter.values_.htmlToString
|
||||
]
|
||||
|> Gen.List.call_.filterMap Gen.ApiRoute.values_.getGlobalHeadTagsDataSource
|
||||
)
|
||||
|> Gen.DataSource.call_.combine
|
||||
|> Gen.DataSource.call_.map Gen.List.values_.concat
|
||||
|> Elm.withType
|
||||
(Gen.DataSource.annotation_.dataSource
|
||||
(Type.list Gen.Head.annotation_.tag)
|
||||
)
|
||||
)
|
||||
|
||||
getStaticRoutes :
|
||||
{ declaration : Elm.Declaration
|
||||
, reference : Elm.Expression
|
||||
, referenceFrom : List String -> Elm.Expression
|
||||
}
|
||||
getStaticRoutes =
|
||||
topLevelValue "getStaticRoutes" todo
|
||||
in
|
||||
Elm.file [ "Main" ]
|
||||
[ Elm.alias "Model"
|
||||
@ -299,42 +342,6 @@ otherFile routes phaseString =
|
||||
]
|
||||
|
||||
|
||||
globalHeadTags =
|
||||
topLevelValue "globalHeadTags"
|
||||
(Elm.Op.cons
|
||||
(Elm.value
|
||||
{ importFrom = [ "Site" ]
|
||||
, annotation = Nothing
|
||||
, name = "config"
|
||||
}
|
||||
|> Elm.get "head"
|
||||
)
|
||||
(Elm.apply
|
||||
(Elm.value
|
||||
{ importFrom = [ "Api" ]
|
||||
, annotation = Nothing
|
||||
, name = "routes"
|
||||
}
|
||||
)
|
||||
[ getStaticRoutes.reference
|
||||
, Gen.HtmlPrinter.values_.htmlToString
|
||||
]
|
||||
|> Gen.List.call_.filterMap Gen.ApiRoute.values_.getGlobalHeadTagsDataSource
|
||||
)
|
||||
|> Gen.DataSource.call_.combine
|
||||
|> Gen.DataSource.call_.map Gen.List.values_.concat
|
||||
|> Elm.withType
|
||||
(Gen.DataSource.annotation_.dataSource
|
||||
(Type.list Gen.Head.annotation_.tag)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
getStaticRoutes : { declaration : Elm.Declaration, reference : Elm.Expression, referenceFrom : List String -> Elm.Expression }
|
||||
getStaticRoutes =
|
||||
topLevelValue "getStaticRoutes" todo
|
||||
|
||||
|
||||
todo : Elm.Expression
|
||||
todo =
|
||||
Elm.apply (Elm.val "Debug.todo") [ Elm.string "" ]
|
||||
|
Loading…
Reference in New Issue
Block a user