spicetify-themes/.github/manifest_generator.mjs
2022-07-06 01:01:30 +01:00

15 lines
388 B
JavaScript
Executable File

#!/usr/bin/env zx
const output = (await $`ls -d */`).stdout.trim();
cd('.github');
const final_manifest = await Promise.all(output.split('\n').map(async (dir) => {
cd('../' + dir);
const theme_manifest = (await $`cat manifest.json`).stdout.trim();
return JSON.parse(theme_manifest);
}));
cd('..');
await $`echo ${JSON.stringify(final_manifest, null, 2)} > manifest.json`;