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.

19 lines
553 B

3 years ago
  1. import fs from "fs";
  2. export let collection = JSON.parse(fs.readFileSync("./compiler/output/_collection.json"));
  3. const names = [];
  4. for (const item of collection.items) {
  5. names.push(JSON.parse(fs.readFileSync(`./compiler/output/${item.name}.json`)));
  6. }
  7. export function reload() {
  8. Object.assign(collection, JSON.parse(fs.readFileSync("./compiler/output/_collection.json")));
  9. names.splice(0);
  10. for (const item of collection.items) {
  11. names.push(JSON.parse(fs.readFileSync(`./compiler/output/${item.name}.json`)));
  12. }
  13. }
  14. export default names;