« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/write
diff options
context:
space:
mode:
Diffstat (limited to 'src/write')
-rw-r--r--src/write/bind-utilities.js4
-rw-r--r--src/write/build-modes/live-dev-server.js10
-rw-r--r--src/write/build-modes/static-build.js10
3 files changed, 10 insertions, 14 deletions
diff --git a/src/write/bind-utilities.js b/src/write/bind-utilities.js
index 4b037a91..6212b824 100644
--- a/src/write/bind-utilities.js
+++ b/src/write/bind-utilities.js
@@ -52,8 +52,10 @@ import {
 
 export function bindUtilities({
   absoluteTo,
+  defaultLanguage,
   getSizeOfAdditionalFile,
   language,
+  languages,
   to,
   urls,
   wikiData,
@@ -65,9 +67,11 @@ export function bindUtilities({
 
   Object.assign(bound, {
     absoluteTo,
+    defaultLanguage,
     getSizeOfAdditionalFile,
     html,
     language,
+    languages,
     to,
     urls,
     wikiData,
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index a4c4c871..0e2b6160 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -278,8 +278,10 @@ export async function go({
 
       const bound = bindUtilities({
         absoluteTo,
+        defaultLanguage,
         getSizeOfAdditionalFile,
         language,
+        languages,
         to,
         urls,
         wikiData,
@@ -288,19 +290,13 @@ export async function go({
       const pageInfo = page.page(bound);
 
       const pageHTML = generateDocumentHTML(pageInfo, {
+        ...bound,
         cachebust,
-        defaultLanguage,
         developersComment,
-        getThemeString: bound.getThemeString,
-        language,
-        languages,
         localizedPathnames,
         oEmbedJSONHref: null, // No oEmbed support for live dev server
         pagePath: servePath,
         pathname,
-        to,
-        transformMultiline: bound.transformMultiline,
-        wikiData,
       });
 
       console.log(`${requestHead} [200] ${pathname}`);
diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js
index 691ce579..220e51f4 100644
--- a/src/write/build-modes/static-build.js
+++ b/src/write/build-modes/static-build.js
@@ -292,8 +292,10 @@ export async function go({
 
         const bound = bindUtilities({
           absoluteTo,
+          defaultLanguage,
           getSizeOfAdditionalFile,
           language,
+          languages,
           to,
           urls,
           wikiData,
@@ -315,19 +317,13 @@ export async function go({
               .to('shared.path', pathname + 'oembed.json');
 
         const pageHTML = generateDocumentHTML(pageInfo, {
+          ...bound,
           cachebust,
-          defaultLanguage,
           developersComment,
-          getThemeString: bound.getThemeString,
-          language,
-          languages,
           localizedPathnames,
           oEmbedJSONHref,
           pagePath,
           pathname,
-          to,
-          transformMultiline: bound.transformMultiline,
-          wikiData,
         });
 
         return writePage({