mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-25 18:13:52 +03:00
647814e920
* Implemented "wasp build" cmd - generates different schema.prisma. * PR fixes.
44 lines
1.5 KiB
Haskell
44 lines
1.5 KiB
Haskell
module Common
|
|
( WaspProjectDir
|
|
, DotWaspDir
|
|
, dotWaspDirInWaspProjectDir
|
|
, dotWaspRootFileInWaspProjectDir
|
|
, extCodeDirInWaspProjectDir
|
|
, generatedCodeDirInDotWaspDir
|
|
, buildDirInDotWaspDir
|
|
, 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
|
|
import qualified Util.Terminal as Term
|
|
|
|
|
|
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|]
|
|
|
|
buildDirInDotWaspDir :: Path (Rel DotWaspDir) (Dir Generator.Common.ProjectRootDir)
|
|
buildDirInDotWaspDir = SP.fromPathRelDir [P.reldir|build|]
|
|
|
|
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 $ Term.applyStyles [Term.Yellow] what
|