diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-05-27 16:28:45 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-09-12 14:16:22 -0300 |
commit | b485117d885f723fb81a8e573050747393c004cf (patch) | |
tree | 2ff4da912cbf4a463ad74928a771d126cd07ba7d /src/write/build-modes/live-dev-server.js | |
parent | 7924ab5deeaca905192c11a82a937d7615328b48 (diff) |
write: factor out commonUtilities
Diffstat (limited to 'src/write/build-modes/live-dev-server.js')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index fe627f6f..c855533b 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -332,6 +332,17 @@ export async function go({ // Other routes determined by page and URL specs + const commonUtilities = { + defaultLanguage, + getSizeOfAdditionalFile, + getSizeOfImagePath, + languages, + missingImagePaths, + thumbsCache, + urls, + wikiData, + }; + const startTiming = () => { if (!showTimings) { return () => ''; @@ -417,19 +428,13 @@ export async function go({ const timing = startTiming(); const bound = bindUtilities({ + ...commonUtilities, + absoluteTo, - defaultLanguage, - getSizeOfAdditionalFile, - getSizeOfImagePath, language, - languages, - missingImagePaths, pagePath: servePath, pagePathStringFromRoot: pathname.replace(/^\//, ''), - thumbsCache, to, - urls, - wikiData, }); const topLevelResult = |