« get me outta code hell

data: import Thing.common utilities directly - 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>2023-09-07 12:38:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-07 12:38:34 -0300
commiteb00f2993a1aaaba171ad6c918656552f80bb748 (patch)
tree5e61200ed707e02b76c337cb9107aa5f1eaa8898 /src/upd8.js
parent6889c764caef5542ba9ad8362acf6e8b7b879ea9 (diff)
data: import Thing.common utilities directly
Also rename 'color' (from #cli) to 'colors'.
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 2ec231c9..f6091ca2 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -47,7 +47,7 @@ import {generateURLs, urlSpec} from '#urls';
 import {sortByName} from '#wiki-data';
 
 import {
-  color,
+  colors,
   decorateTime,
   logWarn,
   logInfo,
@@ -279,7 +279,7 @@ async function main() {
     const indentWrap = (spaces, str) => wrap(str, {width: 60 - spaces, indent: ' '.repeat(spaces)});
 
     const showOptions = (msg, options) => {
-      console.log(color.bright(msg));
+      console.log(colors.bright(msg));
 
       const entries = Object.entries(options);
       const sortedOptions = sortByName(entries
@@ -310,13 +310,13 @@ async function main() {
           console.log('');
         }
 
-        console.log(color.bright(` --` + name) +
+        console.log(colors.bright(` --` + name) +
           (aliases.length
-            ? ` (or: ${aliases.map(alias => color.bright(`--` + alias)).join(', ')})`
+            ? ` (or: ${aliases.map(alias => colors.bright(`--` + alias)).join(', ')})`
             : '') +
           (descriptor.help
             ? ''
-            : color.dim('  (no help provided)')));
+            : colors.dim('  (no help provided)')));
 
         if (wrappedHelp) {
           console.log(wrappedHelp);
@@ -336,7 +336,7 @@ async function main() {
     };
 
     console.log(
-      color.bright(`hsmusic (aka. Homestuck Music Wiki)\n`) +
+      colors.bright(`hsmusic (aka. Homestuck Music Wiki)\n`) +
       `static wiki software cataloguing collaborative creation\n`);
 
     console.log(indentWrap(0,
@@ -496,7 +496,7 @@ async function main() {
 
   {
     const logThings = (thingDataProp, label) =>
-      logInfo` - ${wikiData[thingDataProp]?.length ?? color.red('(Missing!)')} ${color.normal(color.dim(label))}`;
+      logInfo` - ${wikiData[thingDataProp]?.length ?? colors.red('(Missing!)')} ${colors.normal(colors.dim(label))}`;
     try {
       logInfo`Loaded data and processed objects:`;
       logThings('albumData', 'albums');