Skip to content

Commit

Permalink
Rearrange functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic committed Jan 22, 2025
1 parent 97b06af commit 821b287
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions waspc/src/Wasp/Generator/WebAppGenerator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,6 @@ genWebApp spec = do
where
genFileCopy = return . C.mkTmplFd

genAppTsConfigJson :: AppSpec -> Generator FileDraft
genAppTsConfigJson spec = do
return $
C.mkTmplFdWithDstAndData
(C.asTmplFile [relfile|tsconfig.app.json|])
(C.asWebAppFile [relfile|tsconfig.app.json|])
( Just $
object
[ "srcTsConfigPath" .= SP.fromRelFile srcTsConfigPath
]
)
where
srcTsConfigPath :: Path' (Rel C.WebAppRootDir) (File SrcTsConfigFile) =
waspProjectDirFromAppComponentDir </> AS.srcTsConfigPath spec

genDotEnv :: AppSpec -> Generator [FileDraft]
-- Don't generate .env if we are building for production, since .env is to be used only for
-- development.
Expand Down Expand Up @@ -126,6 +111,21 @@ genPackageJson spec waspDependencies = do
]
)

genAppTsConfigJson :: AppSpec -> Generator FileDraft
genAppTsConfigJson spec = do
return $
C.mkTmplFdWithDstAndData
(C.asTmplFile [relfile|tsconfig.app.json|])
(C.asWebAppFile [relfile|tsconfig.app.json|])
( Just $
object
[ "srcTsConfigPath" .= SP.fromRelFile srcTsConfigPath
]
)
where
srcTsConfigPath :: Path' (Rel C.WebAppRootDir) (File SrcTsConfigFile) =
waspProjectDirFromAppComponentDir </> AS.srcTsConfigPath spec

genNpmrc :: Generator FileDraft
genNpmrc =
return $
Expand Down

0 comments on commit 821b287

Please sign in to comment.