forked from kofal.net/zmk
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:
committed by
Pete Johanson
parent
e544d74948
commit
01d2102c23
@@ -14,8 +14,8 @@ const Mustache = require("mustache");
|
||||
function generateSetupScripts() {
|
||||
return glob("../app/boards/**/*.zmk.yml", (error, files) => {
|
||||
const aggregated = files.map((f) => ({
|
||||
...yaml.safeLoadAll(fs.readFileSync(f, "utf8"))[0],
|
||||
base_dir: path.basename(path.dirname(f)),
|
||||
...yaml.load(fs.readFileSync(f, "utf8")),
|
||||
__base_dir: path.basename(path.dirname(f)),
|
||||
}));
|
||||
|
||||
const data = aggregated.reduce(
|
||||
|
||||
Reference in New Issue
Block a user