2020-01-09 12:58:07 +03:00
|
|
|
module Fixtures where
|
|
|
|
|
2020-09-17 16:41:59 +03:00
|
|
|
import Data.Maybe (fromJust)
|
2021-04-28 18:36:00 +03:00
|
|
|
import qualified Path as P
|
2020-09-17 16:41:59 +03:00
|
|
|
import qualified System.FilePath as FP
|
2020-01-09 12:58:07 +03:00
|
|
|
import Wasp
|
2020-07-31 15:26:10 +03:00
|
|
|
import qualified Wasp.Route as RouteAST
|
2020-01-09 12:58:07 +03:00
|
|
|
|
2020-01-14 14:59:56 +03:00
|
|
|
app :: App
|
2021-04-28 18:36:00 +03:00
|
|
|
app =
|
|
|
|
App
|
|
|
|
{ appName = "test_app",
|
|
|
|
appTitle = "Hello World!",
|
|
|
|
appHead = Nothing
|
2020-01-14 14:59:56 +03:00
|
|
|
}
|
|
|
|
|
2020-07-31 15:26:10 +03:00
|
|
|
routeHome :: RouteAST.Route
|
2021-04-28 18:36:00 +03:00
|
|
|
routeHome =
|
|
|
|
RouteAST.Route
|
|
|
|
{ RouteAST._urlPath = "/home",
|
|
|
|
RouteAST._targetPage = "Home"
|
2020-07-31 15:26:10 +03:00
|
|
|
}
|
|
|
|
|
2020-01-09 12:58:07 +03:00
|
|
|
wasp :: Wasp
|
2021-04-28 18:36:00 +03:00
|
|
|
wasp =
|
|
|
|
fromWaspElems
|
2020-01-14 14:59:56 +03:00
|
|
|
[ WaspElementApp app
|
2020-01-09 12:58:07 +03:00
|
|
|
]
|
2020-01-28 13:37:36 +03:00
|
|
|
|
2020-10-02 18:22:56 +03:00
|
|
|
systemPathRoot :: P.Path P.Abs P.Dir
|
|
|
|
systemPathRoot = fromJust $ P.parseAbsDir systemFpRoot
|
|
|
|
|
|
|
|
systemFpRoot :: FilePath
|
|
|
|
systemFpRoot = if FP.pathSeparator == '\\' then "C:\\" else "/"
|