From 6f5008ac4101dda1d9341fbe565225aeda661cf3 Mon Sep 17 00:00:00 2001 From: Peter Becich Date: Sun, 28 Jan 2024 15:12:34 -0800 Subject: [PATCH] example, generate PureScript before server starts --- example/app/Main.hs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/example/app/Main.hs b/example/app/Main.hs index e7270986..61436093 100644 --- a/example/app/Main.hs +++ b/example/app/Main.hs @@ -5,6 +5,21 @@ import Data.Text (pack) import Language.PureScript.Bridge import qualified MyLib (main) import Types +import ArgonautTypes +import JsonHelpersTypes main :: IO () -main = MyLib.main +main = do + -- generate PureScript before server starts + writePSTypesWithNamespace + (Just . PackageName $ pack "Argonaut") + "src" + (buildBridge myBridge) + myArgonautTypes + writePSTypesWithNamespace + (Just . PackageName $ pack "JsonHelpers") + "src" + (buildBridge myBridge) + myJsonHelpersTypes + + MyLib.main