The namegen5 website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
553 B

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;