From 5b4754de37a0d43e9a4d7f65dd63cb4ebcdda7d2 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Thu, 15 Sep 2022 13:49:43 -0700 Subject: [PATCH] Generate stub. --- codegen/GenerateMain.elm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/codegen/GenerateMain.elm b/codegen/GenerateMain.elm index 9b1595de..e70148f2 100644 --- a/codegen/GenerateMain.elm +++ b/codegen/GenerateMain.elm @@ -214,7 +214,15 @@ otherFile routes phaseString = , referenceFrom : List String -> Elm.Expression } getStaticRoutes = - topLevelValue "getStaticRoutes" todo + topLevelValue "getStaticRoutes" + (Gen.DataSource.combine + [] + |> Gen.DataSource.call_.map Gen.List.values_.concat + |> Elm.withType + (Gen.DataSource.annotation_.dataSource + (Type.list (Type.named [ "Route" ] "Route")) + ) + ) in Elm.file [ "Main" ] [ Elm.alias "Model" @@ -324,6 +332,7 @@ otherFile routes phaseString = |> Elm.declaration "main" |> expose , config.declaration + , getStaticRoutes.declaration , Elm.portOutgoing "sendPageData" (Type.record [ ( "oldThing", Gen.Json.Encode.annotation_.value )