« get me outta code hell

write: writeTargetless -> pathsTargetless - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-24 11:47:15 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-24 11:47:15 -0300
commit450f51216a10026c2175de1acc08b11a093a3466 (patch)
tree6d7e13252a38f477a06abeb3964633d2847ec007 /src
parent6fc9a17aad2346177fb3e6e27694a5997e970347 (diff)
write: writeTargetless -> pathsTargetless
Diffstat (limited to 'src')
-rw-r--r--src/write/build-modes/live-dev-server.js4
-rw-r--r--src/write/build-modes/static-build.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index d39b6fdf..d7c33d87 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -101,7 +101,7 @@ export async function go({
       targetless,
     }) => () => {
       if (targetless) {
-        const result = pageSpec.writeTargetless({wikiData});
+        const result = pageSpec.pathsTargetless({wikiData});
         return Array.isArray(result) ? result : [result];
       } else {
         return pageSpec.pathsForTarget(target);
@@ -512,7 +512,7 @@ function getPageSpecsWithTargets({
         ? pageSpec.targets({wikiData})
             .map(target => ({pageSpec, target}))
         : [],
-      Object.hasOwn(pageSpec, 'writeTargetless') &&
+      Object.hasOwn(pageSpec, 'pathsTargetless') &&
         {pageSpec, targetless: true},
     ])
     .filter(Boolean);
diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js
index f4131a3d..2fb82b84 100644
--- a/src/write/build-modes/static-build.js
+++ b/src/write/build-modes/static-build.js
@@ -173,8 +173,8 @@ export async function go({
 
         const paths = [];
 
-        if (pageSpec.writeTargetless) {
-          const result = pageSpec.writeTargetless({wikiData});
+        if (pageSpec.pathsTargetless) {
+          const result = pageSpec.pathsTargetless({wikiData});
           if (Array.isArray(result)) {
             paths.push(...result);
           } else {