import fs from "fs"; export let collection = JSON.parse(fs.readFileSync("./compiler/output/_collection.json")); const names = []; for (const item of collection.items) { names.push(JSON.parse(fs.readFileSync(`./compiler/output/${item.name}.json`))); } export function reload() { Object.assign(collection, JSON.parse(fs.readFileSync("./compiler/output/_collection.json"))); names.splice(0); for (const item of collection.items) { names.push(JSON.parse(fs.readFileSync(`./compiler/output/${item.name}.json`))); } } export default names;