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

@ -7,7 +7,8 @@ import { promises as fs } from 'fs'
const lang = process.env.CARDLANG as Langs || "en"
const endpoint = getBaseFolder(lang, "categories")
const btsp = async () => {
export default async () => {
console.log(endpoint)
const list: Array<CategorySimple> = []
for (const cat of Object.values(Category)) {
@ -25,5 +26,5 @@ const btsp = async () => {
await fs.mkdir(endpoint, {recursive: true})
await fs.writeFile(`${endpoint}/index.json`, JSON.stringify(res))
console.log('ended ' + endpoint)
}
btsp()

View File

@ -14,7 +14,8 @@ const lang = process.env.CARDLANG as Langs || "en"
const endpoint = getBaseFolder(lang, "categories")
const btsp = async () => {
export default async () => {
console.log(endpoint)
const list = getAllCards()
const arr: categoryCards = {}
for (const i of list) {
@ -49,6 +50,5 @@ const btsp = async () => {
await promises.writeFile(`${name}/index.json`, JSON.stringify(toSave))
}
}
console.log('ended ' + endpoint)
}
btsp()