mirror of
https://github.com/tcgdex/compiler.git
synced 2025-07-29 23:49:50 +00:00
Updated Compiler to be quicker
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@ -10,7 +10,8 @@ const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "expansions")
|
||||
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const expansions = getAllExpansions()
|
||||
let list: Array<{
|
||||
release: string,
|
||||
@ -40,6 +41,5 @@ const btsp = async () => {
|
||||
|
||||
await fs.mkdir(endpoint, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(res))
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
@ -8,7 +8,8 @@ const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "expansions")
|
||||
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const list = getAllExpansions()
|
||||
for (const i of list) {
|
||||
const expansion = fetchExpansion(i)
|
||||
@ -17,6 +18,5 @@ const btsp = async () => {
|
||||
await fs.mkdir(`${endpoint}/${expansion.code}/`, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/${expansion.code}/index.json`, JSON.stringify(expansionToExpansionSingle(expansion, lang)))
|
||||
}
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
Reference in New Issue
Block a user