mirror of
https://github.com/tcgdex/compiler.git
synced 2025-08-04 18:01:59 +00:00
Updated Compiler to be quicker
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@@ -8,8 +8,8 @@ import { List } from "@tcgdex/sdk/interfaces/General"
|
||||
const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "types")
|
||||
|
||||
const btsp = async () => {
|
||||
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const typeArr: Array<TypeSimple> = []
|
||||
for (const i of Object.values(Type)) {
|
||||
if (typeof i !== "number") continue
|
||||
@@ -26,6 +26,5 @@ const btsp = async () => {
|
||||
|
||||
await fs.mkdir(endpoint, {recursive: true})
|
||||
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(typeList))
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
@@ -14,7 +14,8 @@ const lang = process.env.CARDLANG as Langs || "en"
|
||||
const endpoint = getBaseFolder(lang, "types")
|
||||
|
||||
|
||||
const btsp = async () => {
|
||||
export default async () => {
|
||||
console.log(endpoint)
|
||||
const list = getAllCards()
|
||||
const arr: typeCards = {}
|
||||
for (const i of list) {
|
||||
@@ -48,6 +49,5 @@ const btsp = async () => {
|
||||
await promises.writeFile(`${name}/index.json`, JSON.stringify(toSave))
|
||||
}
|
||||
}
|
||||
console.log('ended ' + endpoint)
|
||||
}
|
||||
|
||||
btsp()
|
||||
|
Reference in New Issue
Block a user