wasp/waspc/test/Fixtures.hs

35 lines
671 B
Haskell
Raw Normal View History

module Fixtures where
import Data.Maybe (fromJust)
2021-04-28 18:36:00 +03:00
import qualified Path as P
import qualified System.FilePath as FP
import Wasp
import qualified Wasp.Route as RouteAST
app :: App
2021-04-28 18:36:00 +03:00
app =
App
{ appName = "test_app",
appTitle = "Hello World!",
appHead = Nothing
}
routeHome :: RouteAST.Route
2021-04-28 18:36:00 +03:00
routeHome =
RouteAST.Route
{ RouteAST._urlPath = "/home",
RouteAST._targetPage = "Home"
}
wasp :: Wasp
2021-04-28 18:36:00 +03:00
wasp =
fromWaspElems
[ WaspElementApp app
]
systemPathRoot :: P.Path P.Abs P.Dir
systemPathRoot = fromJust $ P.parseAbsDir systemFpRoot
systemFpRoot :: FilePath
systemFpRoot = if FP.pathSeparator == '\\' then "C:\\" else "/"