feat(SW-706): load .env.local for download and upload

This commit is contained in:
Michael Zetterberg
2025-04-14 11:50:54 +02:00
parent 7de46cafa8
commit 37ac9f607c
5 changed files with 11 additions and 5 deletions

View File

@@ -70,3 +70,5 @@ SAS_API_ENDPOINT=""
SAS_AUTH_ENDPOINT=""
SAS_OCP_APIM=""
SAS_AUTH_CLIENTID=""
LOKALISE_API_KEY=""

View File

@@ -1,10 +1,13 @@
import path from "node:path"
import { download } from "./lokalise"
import { config } from "dotenv"
config({ path: `${process.cwd()}/.env.local` })
const extractPath = path.resolve(__dirname, "translations")
async function main() {
const { download } = await import("./lokalise")
await download(extractPath)
}

View File

@@ -1,10 +1,13 @@
import path from "node:path"
import { upload } from "./lokalise"
import { config } from "dotenv"
config({ path: `${process.cwd()}/.env.local` })
const filepath = path.resolve(__dirname, "./extracted.json")
async function main() {
const { upload } = await import("./lokalise")
await upload(filepath)
}

View File

@@ -157,7 +157,6 @@
"framer-motion": "^11.3.28",
"glob": "^11.0.1",
"husky": "^9.1.7",
"jiti": "^1",
"lint-staged": "^15.4.1",
"material-symbols": "^0.29.0",
"prettier": "^3.4.2",

View File

@@ -6323,7 +6323,6 @@ __metadata:
framer-motion: "npm:^11.3.28"
glob: "npm:^11.0.1"
husky: "npm:^9.1.7"
jiti: "npm:^1"
lint-staged: "npm:^15.4.1"
material-symbols: "npm:^0.29.0"
prettier: "npm:^3.4.2"
@@ -15031,7 +15030,7 @@ __metadata:
languageName: node
linkType: hard
"jiti@npm:^1, jiti@npm:^1.21.0":
"jiti@npm:^1.21.0":
version: 1.21.7
resolution: "jiti@npm:1.21.7"
bin: