wasp/waspc/test/Fixtures.hs

33 lines
663 B
Haskell
Raw Normal View History

module Fixtures where
import qualified Path as P
import Data.Maybe (fromJust)
import qualified System.FilePath as FP
import Wasp
import qualified Wasp.Route as RouteAST
app :: App
app = App
{ appName = "test_app"
, appTitle = "Hello World!"
2021-02-04 13:42:01 +03:00
, appHead = Nothing
}
routeHome :: RouteAST.Route
routeHome = RouteAST.Route
{ RouteAST._urlPath = "/home"
, RouteAST._targetPage = "Home"
}
wasp :: Wasp
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 "/"