feat(SW-706): load .env.local for download and upload
This commit is contained in:
@@ -70,3 +70,5 @@ SAS_API_ENDPOINT=""
|
|||||||
SAS_AUTH_ENDPOINT=""
|
SAS_AUTH_ENDPOINT=""
|
||||||
SAS_OCP_APIM=""
|
SAS_OCP_APIM=""
|
||||||
SAS_AUTH_CLIENTID=""
|
SAS_AUTH_CLIENTID=""
|
||||||
|
|
||||||
|
LOKALISE_API_KEY=""
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import path from "node:path"
|
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")
|
const extractPath = path.resolve(__dirname, "translations")
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
const { download } = await import("./lokalise")
|
||||||
await download(extractPath)
|
await download(extractPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import path from "node:path"
|
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")
|
const filepath = path.resolve(__dirname, "./extracted.json")
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
const { upload } = await import("./lokalise")
|
||||||
await upload(filepath)
|
await upload(filepath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,6 @@
|
|||||||
"framer-motion": "^11.3.28",
|
"framer-motion": "^11.3.28",
|
||||||
"glob": "^11.0.1",
|
"glob": "^11.0.1",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"jiti": "^1",
|
|
||||||
"lint-staged": "^15.4.1",
|
"lint-staged": "^15.4.1",
|
||||||
"material-symbols": "^0.29.0",
|
"material-symbols": "^0.29.0",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
|
|||||||
@@ -6323,7 +6323,6 @@ __metadata:
|
|||||||
framer-motion: "npm:^11.3.28"
|
framer-motion: "npm:^11.3.28"
|
||||||
glob: "npm:^11.0.1"
|
glob: "npm:^11.0.1"
|
||||||
husky: "npm:^9.1.7"
|
husky: "npm:^9.1.7"
|
||||||
jiti: "npm:^1"
|
|
||||||
lint-staged: "npm:^15.4.1"
|
lint-staged: "npm:^15.4.1"
|
||||||
material-symbols: "npm:^0.29.0"
|
material-symbols: "npm:^0.29.0"
|
||||||
prettier: "npm:^3.4.2"
|
prettier: "npm:^3.4.2"
|
||||||
@@ -15031,7 +15030,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"jiti@npm:^1, jiti@npm:^1.21.0":
|
"jiti@npm:^1.21.0":
|
||||||
version: 1.21.7
|
version: 1.21.7
|
||||||
resolution: "jiti@npm:1.21.7"
|
resolution: "jiti@npm:1.21.7"
|
||||||
bin:
|
bin:
|
||||||
|
|||||||
Reference in New Issue
Block a user