mirror of
https://github.com/tcgdex/compiler.git
synced 2025-07-30 07:59:50 +00:00
Updated Compiler to be quicker
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@ -6,7 +6,8 @@ import { promises as fs} from "fs"
|
||||
const lang = process.env.CARDLANG || "en"
|
||||
const endpoint = getBaseFolder(lang, "illustrators")
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
|
||||
const db = await fetchIllustrators()
|
||||
|
||||
@ -17,6 +18,5 @@ const btsp = async () => {
|
||||
|
||||
await fs.mkdir(endpoint, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(res))
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
@ -13,7 +13,8 @@ interface t {
|
||||
[key: string]: Array<Card>
|
||||
}
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
|
||||
const db = await fetchIllustrators()
|
||||
const cards = getAllCards()
|
||||
@ -44,6 +45,5 @@ const btsp = async () => {
|
||||
await fs.writeFile(`${endpoint}/${toSave.id}/index.json`, JSON.stringify(toSave))
|
||||
}
|
||||
}
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
@ -6,7 +6,7 @@ import { illustratorsFile, fetchIllustrators } from "../illustratorUtil"
|
||||
|
||||
const dbFile = illustratorsFile
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
const db = await fetchIllustrators()
|
||||
|
||||
|
||||
@ -26,5 +26,3 @@ const btsp = async () => {
|
||||
|
||||
await fs.writeFile(dbFile, JSON.stringify(db))
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
Reference in New Issue
Block a user