mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-06-12 15:59:18 +00:00
feat: Add Prismatic Evolutions (#637)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* eslint-disable max-statements */
|
||||
import { promises as fs } from 'fs'
|
||||
import { existsSync, promises as fs } from 'fs'
|
||||
import { SupportedLanguages } from '../../interfaces'
|
||||
import { FileFunction } from './compilerInterfaces'
|
||||
import { fetchRemoteFile, loadLastEdits } from './utils/util'
|
||||
@ -37,8 +37,17 @@ const DIST_FOLDER = './generated'
|
||||
// final folder path
|
||||
const folder = `${DIST_FOLDER}/${lang}`
|
||||
|
||||
// console.log('files1:', await fs.readdir('.'))
|
||||
// console.log('files2:', await fs.readdir(DIST_FOLDER))
|
||||
// console.log('files3:', await fs.readdir(folder))
|
||||
|
||||
// Make the folder
|
||||
await fs.mkdir(folder, {recursive: true})
|
||||
try {
|
||||
await fs.mkdir(folder, { recursive: true })
|
||||
} catch {
|
||||
// idk why it throws when file is present even if nodejs says it should not throw...
|
||||
// maybe Bun changed how the throws works...
|
||||
}
|
||||
|
||||
// Import the """Endpoint"""
|
||||
const fn = (await import(`./endpoints/${file}`)).default as FileFunction
|
||||
|
Reference in New Issue
Block a user