refactor: Add js-yaml dep, scrtipt gen tweaks.

*  Make the synthetic "base name" property double underscore prefixed,
  since internal, and to avoid future conflicts w/ YAML format add'ns.
* Switch to PS hash dictionaries for our metadata collections for saner
  data inspection/use.
This commit is contained in:
Peter Johanson
2021-10-16 02:42:38 +00:00
committed by Pete Johanson
parent e544d74948
commit 01d2102c23
6 changed files with 600 additions and 1445 deletions

View File

@@ -12,7 +12,7 @@ const glob = require("glob");
function generateHardwareMetadataAggregate() {
glob("../app/boards/**/*.zmk.yml", (error, files) => {
const aggregated = files.flatMap((f) =>
yaml.safeLoadAll(fs.readFileSync(f, "utf8"))
yaml.loadAll(fs.readFileSync(f, "utf8"))
);
fs.writeFileSync(
"src/data/hardware-metadata.json",