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_OCP_APIM=""
|
||||
SAS_AUTH_CLIENTID=""
|
||||
|
||||
LOKALISE_API_KEY=""
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user