« get me outta code hell

yaml: demonolithize loadAndProcessDataDocuments - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-06 10:02:47 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-06 10:02:47 -0300
commitf502e207d46aea02779d6b860491c303f35911fd (patch)
tree7ac44375b17bc58f07a4c41e1f252363bbef494f /src/upd8.js
parentc8ebe6b73dfec575f765029845bcbc77ed7e1db2 (diff)
yaml: demonolithize loadAndProcessDataDocuments
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/upd8.js b/src/upd8.js
index e2b65b75..9b1f5412 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -51,8 +51,6 @@ import {sortByName} from '#sort';
 import {empty, withEntries} from '#sugar';
 import {generateURLs, urlSpec} from '#urls';
 import {identifyAllWebRoutes} from '#web-routes';
-import {linkWikiDataArrays, loadAndProcessDataDocuments, sortWikiDataArrays}
-  from '#yaml';
 
 import {
   colors,
@@ -80,6 +78,13 @@ import genThumbs, {
   verifyImagePaths,
 } from '#thumbs';
 
+import {
+  getAllDataSteps,
+  linkWikiDataArrays,
+  loadAndProcessDataDocuments,
+  sortWikiDataArrays,
+} from '#yaml';
+
 import FileSizePreloader from './file-size-preloader.js';
 import {listingSpec, listingTargetSpec} from './listing-spec.js';
 import * as buildModes from './write/build-modes/index.js';
@@ -1066,9 +1071,11 @@ async function main() {
 
   let processDataAggregate, wikiDataResult;
 
+  const yamlDataSteps = getAllDataSteps();
+
   try {
     ({aggregate: processDataAggregate, result: wikiDataResult} =
-        await loadAndProcessDataDocuments({dataPath}));
+        await loadAndProcessDataDocuments(yamlDataSteps, {dataPath}));
   } catch (error) {
     console.error(error);
 
@@ -1351,7 +1358,7 @@ async function main() {
     timeStart: Date.now(),
   });
 
-  sortWikiDataArrays(wikiData);
+  sortWikiDataArrays(yamlDataSteps, wikiData);
 
   Object.assign(stepStatusSummary.sortWikiDataArrays, {
     status: STATUS_DONE_CLEAN,