Skip to content

Commit

Permalink
Create an SFZ-specific feed
Browse files Browse the repository at this point in the history
  • Loading branch information
kmturley committed Feb 25, 2023
1 parent 4921766 commit 1a4283f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const DIST_PATH = './out';
const REGISTRY_OUT = 'index.json';
const REGISTRY_OUT_EFFECTS = 'effects.json';
const REGISTRY_OUT_INSTRUMENTS = 'instruments.json';
const REGISTRY_OUT_SFZ = 'sfz.json';

function registryLoad() {
const registry: any = require('./registry.json');
Expand Down Expand Up @@ -35,6 +36,7 @@ async function run() {
const effects: any = { objects: {} };
const index: any = { objects: {} };
const instruments: any = { objects: {} };
const sfz: any = { objects: {} };
for (const pluginId in registry.objects) {
const pluginEntry: PluginEntry = registry.objects[pluginId];
const plugin: PluginInterface = pluginLatest(pluginEntry);
Expand All @@ -45,11 +47,15 @@ async function run() {
if (plugin.tags.includes('Instrument')) {
instruments.objects[pluginId] = pluginEntry;
}
if (plugin.tags.includes('sfz')) {
sfz.objects[pluginId] = pluginEntry;
}
index.objects[pluginId] = pluginEntry;
}
registrySave(`${DIST_PATH}/${REGISTRY_OUT}`, index);
registrySave(`${DIST_PATH}/${REGISTRY_OUT_EFFECTS}`, effects);
registrySave(`${DIST_PATH}/${REGISTRY_OUT_INSTRUMENTS}`, instruments);
registrySave(`${DIST_PATH}/${REGISTRY_OUT_SFZ}`, sfz);
}

run();

0 comments on commit 1a4283f

Please sign in to comment.