Skip to content

Commit

Permalink
update to dotenvx
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Sep 24, 2024
1 parent 2ff1719 commit 8c37646
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 8 deletions.
147 changes: 146 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:ui": "vitest --ui --api 9527",
"test:cov": "vitest run --coverage",
"typecheck": "tsc",
"validate": "npm run typecheck && npm run check && npm run test && npm run check:unused",
"validate": "npm run check && npm run typecheck && npm run test && npm run check:unused",
"check": "biome check .",
"check:fix": "biome check --fix .",
"check:unused": "knip"
Expand All @@ -39,13 +39,13 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^15.0.2",
"remix-custom-routes": "^1.0.1",
"remix-i18next": "^6.4.1",
"tailwind-merge": "^2.5.2",
"zod": "^3.23.8"
},
"devDependencies": {
"@biomejs/biome": "^1.9.2",
"@dotenvx/dotenvx": "^1.14.1",
"@remix-run/dev": "^2.12.1",
"@types/node": "^22.6.1",
"@types/prompt": "^1.1.9",
Expand All @@ -55,8 +55,6 @@
"@vitest/ui": "^2.1.1",
"autoprefixer": "^10.4.20",
"chalk": "^5.3.0",
"dotenv": "^16.4.5",
"glob": "^11.0.0",
"happy-dom": "^15.7.4",
"knip": "^5.30.5",
"lefthook": "^1.7.16",
Expand All @@ -77,4 +75,4 @@
"engines": {
"node": ">=20.0.0"
}
}
}
4 changes: 2 additions & 2 deletions scripts/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { spawn } from "node:child_process"
import dotenvx from "@dotenvx/dotenvx"
import chalk from "chalk"
import dotenv from "dotenv"
import prompt from "prompt"
// add all the env you wish here
const ENVIRONMENTS = ["stage", "prod", "test"]
Expand All @@ -18,7 +18,7 @@ const getEnvInfo = () => {
const setupEnv = () => {
const { envName, path } = getEnvInfo()
console.log(chalk.green(`Loading environment: ${envName}`))
dotenv.config({ path })
dotenvx.config({ path })
console.log(`Environment loaded: ${chalk.green(envName)} from ${chalk.green(path)}`)
}

Expand Down

0 comments on commit 8c37646

Please sign in to comment.