🧑💻 Improve env variables type safety and management (#718)
Closes #679
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
# Don't edit this file
|
||||
NEXT_PUBLIC_VIEWER_URL=
|
||||
@@ -1,2 +0,0 @@
|
||||
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001
|
||||
LANDING_PAGE_HOST=http://localhost:3002
|
||||
@@ -2,10 +2,9 @@
|
||||
"name": "landing-page",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "cross-env ENVSH_ENV=.env.local bash ../../scripts/inject-runtime-env.sh next dev -p 3002",
|
||||
"start": "next start",
|
||||
"build": "next build",
|
||||
"build:env": "cd ../.. && cross-env ENVSH_ENV=./apps/landing-page/.env.docker ENVSH_OUTPUT=./apps/landing-page/public/__env.js bash scripts/inject-runtime-env.sh",
|
||||
"dev": "dotenv -e ./.env -e ../../.env -- next dev -p 3002",
|
||||
"start": "dotenv -e ./.env -e ../../.env -- next start",
|
||||
"build": "dotenv -e ./.env -e ../../.env -- next build",
|
||||
"lint": "next lint",
|
||||
"analyze": "cross-env ANALYZE=true next build"
|
||||
},
|
||||
@@ -14,33 +13,33 @@
|
||||
"@chakra-ui/react": "2.7.1",
|
||||
"@emotion/react": "11.11.1",
|
||||
"@emotion/styled": "11.11.0",
|
||||
"@vercel/analytics": "1.0.1",
|
||||
"@typebot.io/lib": "workspace:*",
|
||||
"@typebot.io/nextjs": "workspace:*",
|
||||
"aos": "2.3.4",
|
||||
"@typebot.io/prisma": "workspace:*",
|
||||
"@typebot.io/schemas": "workspace:*",
|
||||
"aos": "2.3.4",
|
||||
"focus-visible": "5.2.0",
|
||||
"framer-motion": "10.12.20",
|
||||
"@typebot.io/schemas": "workspace:*",
|
||||
"next": "13.4.3",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"@typebot.io/lib": "workspace:*"
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.22.9",
|
||||
"@chakra-ui/styled-system": "2.9.1",
|
||||
"@next/bundle-analyzer": "13.4.9",
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"@types/aos": "3.0.4",
|
||||
"@types/node": "20.4.2",
|
||||
"@types/react": "18.2.15",
|
||||
"autoprefixer": "10.4.14",
|
||||
"cross-env": "7.0.3",
|
||||
"dotenv-cli": "^7.2.1",
|
||||
"eslint": "8.44.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"next-transpile-modules": "10.0.0",
|
||||
"postcss": "8.4.26",
|
||||
"prettier": "3.0.0",
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"typescript": "5.1.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { ChakraProvider } from '@chakra-ui/react'
|
||||
import 'focus-visible/dist/focus-visible'
|
||||
import { theme } from '../lib/chakraTheme'
|
||||
import { AppProps } from 'next/app'
|
||||
import { Analytics } from '@vercel/analytics/react'
|
||||
import AOS from 'aos'
|
||||
import 'aos/dist/aos.css'
|
||||
|
||||
@@ -20,7 +19,6 @@ const App = ({ Component, pageProps }: AppProps) => {
|
||||
return (
|
||||
<ChakraProvider theme={theme}>
|
||||
<Component {...pageProps} />
|
||||
<Analytics />
|
||||
</ChakraProvider>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ class MyDocument extends Document {
|
||||
{/* eslint-disable-next-line @next/next/no-css-tags */}
|
||||
<link href="./styles/aos-noscript.css" rel="stylesheet" />
|
||||
</noscript>
|
||||
{/* eslint-disable-next-line @next/next/no-sync-scripts */}
|
||||
<script src="/__env.js" />
|
||||
</Head>
|
||||
<body style={{ backgroundColor: '#171923' }}>
|
||||
<ColorModeScript initialColorMode={theme.config.initialColorMode} />
|
||||
|
||||
Reference in New Issue
Block a user