Added Backend
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
const schemaDir = path.resolve("db/schema")
|
||||
const indexFile = path.join(schemaDir, "index.ts")
|
||||
|
||||
const files = fs
|
||||
.readdirSync(schemaDir)
|
||||
.filter((f) => f.endsWith(".ts") && f !== "index.ts")
|
||||
|
||||
const exportsToWrite = files
|
||||
.map((f) => `export * from "./${f.replace(".ts", "")}"`)
|
||||
.join("\n")
|
||||
|
||||
fs.writeFileSync(indexFile, exportsToWrite)
|
||||
console.log("✓ schema/index.ts generated")
|
||||
Reference in New Issue
Block a user