« get me outta code hell

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:
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js93
1 files changed, 56 insertions, 37 deletions
diff --git a/src/upd8.js b/src/upd8.js
index f5781272..bfdd1c2a 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -31,25 +31,37 @@
 // Oh yeah, like. Just run this through some relatively recent version of
 // node.js and you'll 8e fine. ...Within the project root. O8viously.
 
-import {execSync} from 'child_process';
-import * as path from 'path';
-import {fileURLToPath} from 'url';
+import {execSync} from 'node:child_process';
+import * as path from 'node:path';
+import {fileURLToPath} from 'node:url';
+
 import wrap from 'word-wrap';
 
+import {processLanguageFile} from '#language';
+import {isMain, traverse} from '#node-utils';
+import bootRepl from '#repl';
+import {empty, showAggregate, withEntries} from '#sugar';
+import {CacheableObject} from '#things';
+import {generateURLs, urlSpec} from '#urls';
+import {sortByName} from '#wiki-data';
+
+import {
+  color,
+  decorateTime,
+  logWarn,
+  logInfo,
+  logError,
+  parseOptions,
+  progressCallAll,
+  progressPromiseAll,
+} from '#cli';
+
 import genThumbs, {
   clearThumbs,
   defaultMagickThreads,
   isThumb,
   verifyImagePaths,
-} from './gen-thumbs.js';
-
-import bootRepl from './repl.js';
-import {listingSpec, listingTargetSpec} from './listing-spec.js';
-import urlSpec from './url-spec.js';
-
-import {processLanguageFile} from './data/language.js';
-
-import CacheableObject from './data/things/cacheable-object.js';
+} from '#thumbs';
 
 import {
   filterDuplicateDirectories,
@@ -58,28 +70,11 @@ import {
   loadAndProcessDataDocuments,
   sortWikiDataArrays,
   WIKI_INFO_FILE,
-} from './data/yaml.js';
-
-import {isMain, traverse} from './util/node-utils.js';
-import {empty, showAggregate, withEntries} from './util/sugar.js';
-import {generateURLs} from './util/urls.js';
-import {sortByName} from './util/wiki-data.js';
-
-import {generateDevelopersCommentHTML} from './write/page-template.js';
-import * as buildModes from './write/build-modes/index.js';
-
-import {
-  color,
-  decorateTime,
-  logWarn,
-  logInfo,
-  logError,
-  parseOptions,
-  progressCallAll,
-  progressPromiseAll,
-} from './util/cli.js';
+} 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';
 
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
 
@@ -725,11 +720,35 @@ async function main() {
 
   if (noBuild) return;
 
-  const developersComment = generateDevelopersCommentHTML({
-    buildTime: BUILD_TIME,
-    commit: COMMIT,
-    wikiData,
-  });
+  const developersComment =
+    `<!--\n` + [
+      wikiData.wikiInfo.canonicalBase
+        ? `hsmusic.wiki - ${wikiData.wikiInfo.name}, ${wikiData.wikiInfo.canonicalBase}`
+        : `hsmusic.wiki - ${wikiData.wikiInfo.name}`,
+      'Code copyright 2019-2023 Quasar Nebula et al (MIT License)',
+      ...wikiData.wikiInfo.canonicalBase === 'https://hsmusic.wiki/' ? [
+        'Data avidly compiled and localization brought to you',
+        'by our awesome team and community of wiki contributors',
+        '***',
+        'Want to contribute? Join our Discord or leave feedback!',
+        '- https://hsmusic.wiki/discord/',
+        '- https://hsmusic.wiki/feedback/',
+        '- https://github.com/hsmusic/',
+      ] : [
+        'https://github.com/hsmusic/',
+      ],
+      '***',
+      BUILD_TIME &&
+        `Site built: ${BUILD_TIME.toLocaleString('en-US', {
+          dateStyle: 'long',
+          timeStyle: 'long',
+        })}`,
+      COMMIT &&
+        `Latest code commit: ${COMMIT}`,
+    ]
+      .filter(Boolean)
+      .map(line => `    ` + line)
+      .join('\n') + `\n-->`;
 
   return selectedBuildMode.go({
     cliOptions,