mirror of
https://github.com/tcgdex/compiler.git
synced 2025-08-02 08:51:59 +00:00
Updated Compiler to be quicker
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@@ -8,7 +8,8 @@ import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
const lang = (process.env.CARDLANG || "en") as Langs
|
||||
const endpoint = getBaseFolder(lang, "retreat")
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const files = await getAllCards2()
|
||||
const count: Array<number> = []
|
||||
for (let file of files) {
|
||||
@@ -30,6 +31,5 @@ const btsp = async () => {
|
||||
|
||||
await fs.mkdir(endpoint, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(list))
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
@@ -8,7 +8,8 @@ import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||
const lang = (process.env.CARDLANG || "en") as Langs
|
||||
const endpoint = getBaseFolder(lang, "retreat")
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const files = await getAllCards2()
|
||||
const count: Array<Array<Card>> = []
|
||||
for (let file of files) {
|
||||
@@ -36,6 +37,5 @@ const btsp = async () => {
|
||||
await fs.writeFile(`${endpoint}/${item.id}/index.json`, JSON.stringify(item))
|
||||
}
|
||||
}
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
Reference in New Issue
Block a user