Skip to content

Commit 726823d

Browse files
Fix use env variables on build to init xata
1 parent 7d5f4be commit 726823d

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"build": "next build",
7+
"build": "npm run xata:init && next build",
88
"start": "next start",
99
"lint": "next lint",
10+
"xata:init": "dotenv -- xata init --db \"$XATA_HTTP_ENDPOINT\" --sdk --no-input --yes --codegen=src/xata.ts --force",
1011
"format": "prettier --write \"./**/*.{ts,tsx,json}\""
1112
},
1213
"dependencies": {
@@ -18,6 +19,7 @@
1819
"class-variance-authority": "^0.7.1",
1920
"clsx": "^2.1.1",
2021
"daisyui": "^4.12.24",
22+
"dotenv-cli": "^10.0.0",
2123
"framer-motion": "^12.23.12",
2224
"jotai": "^2.12.5",
2325
"lucide-react": "^0.536.0",

pnpm-lock.yaml

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)