mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-25 18:13:52 +03:00
38 lines
1.3 KiB
Haskell
38 lines
1.3 KiB
Haskell
module Common
|
|
( WaspProjectDir
|
|
, DotWaspDir
|
|
, dotWaspDirInWaspProjectDir
|
|
, dotWaspRootFileInWaspProjectDir
|
|
, extCodeDirInWaspProjectDir
|
|
, generatedCodeDirInDotWaspDir
|
|
, waspSays
|
|
) where
|
|
|
|
import qualified Path as P
|
|
|
|
import StrongPath (Path, Rel, Dir, File)
|
|
import qualified StrongPath as SP
|
|
import ExternalCode (SourceExternalCodeDir)
|
|
import qualified Generator.Common
|
|
|
|
|
|
data WaspProjectDir -- Root dir of Wasp project, containing source files.
|
|
data DotWaspDir -- Here we put everything that wasp generates.
|
|
|
|
-- TODO: SHould this be renamed to include word "root"?
|
|
dotWaspDirInWaspProjectDir :: Path (Rel WaspProjectDir) (Dir DotWaspDir)
|
|
dotWaspDirInWaspProjectDir = SP.fromPathRelDir [P.reldir|.wasp|]
|
|
|
|
-- TODO: Hm this has different name than it has in Generator.
|
|
generatedCodeDirInDotWaspDir :: Path (Rel DotWaspDir) (Dir Generator.Common.ProjectRootDir)
|
|
generatedCodeDirInDotWaspDir = SP.fromPathRelDir [P.reldir|out|]
|
|
|
|
dotWaspRootFileInWaspProjectDir :: Path (Rel WaspProjectDir) File
|
|
dotWaspRootFileInWaspProjectDir = SP.fromPathRelFile [P.relfile|.wasproot|]
|
|
|
|
extCodeDirInWaspProjectDir :: Path (Rel WaspProjectDir) (Dir SourceExternalCodeDir)
|
|
extCodeDirInWaspProjectDir = SP.fromPathRelDir [P.reldir|ext|]
|
|
|
|
waspSays :: String -> IO ()
|
|
waspSays what = putStrLn $ "\ESC[33m{= Wasp =}\ESC[0m " ++ what -- Yellow
|