Updated Compiler to be quicker

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-05-05 11:46:36 +02:00
parent 346168d68b
commit 557dad7e33
29 changed files with 153 additions and 82 deletions

View File

@@ -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()

View File

@@ -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()