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:
@ -9,7 +9,8 @@ const lang = process.env.CARDLANG as Langs || "en"
|
||||
|
||||
const endpoint = getBaseFolder(lang, "cards")
|
||||
|
||||
const bootstrap = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const list = await getAllCards2()
|
||||
const items: Array<CardSimple> = []
|
||||
for (let el of list) {
|
||||
@ -32,6 +33,5 @@ const bootstrap = async () => {
|
||||
await fs.mkdir(`${endpoint}`, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(cardList))
|
||||
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
bootstrap()
|
||||
|
@ -8,7 +8,8 @@ const lang = process.env.CARDLANG as Langs || "en"
|
||||
|
||||
const endpoint = getBaseFolder(lang, "cards")
|
||||
|
||||
const bootstrap = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const list = await getAllCards2()
|
||||
for (let el of list) {
|
||||
el = el.replace("./", "../../")
|
||||
@ -21,6 +22,5 @@ const bootstrap = async () => {
|
||||
|
||||
// if (if (typeof card.set.availability === "undefined"))
|
||||
}
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
bootstrap()
|
||||
|
Reference in New Issue
Block a user