mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-25 18:13:52 +03:00
Clean up
This commit is contained in:
parent
80baf9c3b1
commit
fb899a09ea
@ -1,4 +1,3 @@
|
|||||||
{{={= =}=}}
|
|
||||||
import { stripTrailingSlash } from '../universal/url.js'
|
import { stripTrailingSlash } from '../universal/url.js'
|
||||||
import { env } from './env.js'
|
import { env } from './env.js'
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ import Wasp.Generator.WebAppGenerator.Common
|
|||||||
reactRouterVersion,
|
reactRouterVersion,
|
||||||
reactVersion,
|
reactVersion,
|
||||||
)
|
)
|
||||||
import qualified Wasp.Generator.WebAppGenerator.Common as WebApp
|
|
||||||
import qualified Wasp.Node.Version as NodeVersion
|
import qualified Wasp.Node.Version as NodeVersion
|
||||||
import Wasp.Project.Common (WaspProjectDir)
|
import Wasp.Project.Common (WaspProjectDir)
|
||||||
import qualified Wasp.Project.Db as Db
|
import qualified Wasp.Project.Db as Db
|
||||||
@ -100,7 +99,7 @@ genSdk spec =
|
|||||||
genFileCopy [relfile|client/test/index.ts|],
|
genFileCopy [relfile|client/test/index.ts|],
|
||||||
genFileCopy [relfile|client/index.ts|],
|
genFileCopy [relfile|client/index.ts|],
|
||||||
genFileCopy [relfile|dev/index.ts|],
|
genFileCopy [relfile|dev/index.ts|],
|
||||||
genClientConfigFile,
|
genFileCopy [relfile|client/config.ts|],
|
||||||
genServerConfigFile spec,
|
genServerConfigFile spec,
|
||||||
genTsConfigJson,
|
genTsConfigJson,
|
||||||
genServerUtils spec,
|
genServerUtils spec,
|
||||||
@ -249,18 +248,9 @@ genServerConfigFile spec = return $ C.mkTmplFdWithData relConfigFilePath tmplDat
|
|||||||
tmplData =
|
tmplData =
|
||||||
object
|
object
|
||||||
[ "isAuthEnabled" .= isAuthEnabled spec,
|
[ "isAuthEnabled" .= isAuthEnabled spec,
|
||||||
"databaseUrlEnvVarName" .= Db.databaseUrlEnvVarName,
|
"databaseUrlEnvVarName" .= Db.databaseUrlEnvVarName
|
||||||
"defaultClientUrl" .= WebApp.getDefaultDevClientUrl spec,
|
|
||||||
"defaultServerUrl" .= Server.defaultDevServerUrl,
|
|
||||||
"defaultServerPort" .= Server.defaultServerPort
|
|
||||||
]
|
]
|
||||||
|
|
||||||
genClientConfigFile :: Generator FileDraft
|
|
||||||
genClientConfigFile = return $ C.mkTmplFdWithData relConfigFilePath tmplData
|
|
||||||
where
|
|
||||||
relConfigFilePath = [relfile|client/config.ts|]
|
|
||||||
tmplData = object ["defaultServerUrl" .= Server.defaultDevServerUrl]
|
|
||||||
|
|
||||||
-- todo(filip): remove this duplication, we have almost the same thing in the
|
-- todo(filip): remove this duplication, we have almost the same thing in the
|
||||||
-- ServerGenerator.
|
-- ServerGenerator.
|
||||||
genTsConfigJson :: Generator FileDraft
|
genTsConfigJson :: Generator FileDraft
|
||||||
|
Loading…
Reference in New Issue
Block a user