« get me outta code hell

move upd8 code files into their own directory - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-05-05 10:10:50 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-05-05 10:10:50 -0300
commit2260541dc69c19e7444348ac3243f96e4321b781 (patch)
treedcccfe4acb5816c94194a78b352b4880c5071629
parent1aeb764069cdc592e025f6a790acf5d1f78f740c (diff)
move upd8 code files into their own directory
-rw-r--r--README.md4
-rw-r--r--package.json2
-rw-r--r--upd8/gen-thumbs.js (renamed from gen-thumbs.js)2
-rwxr-xr-xupd8/main.js (renamed from upd8.js)4
-rw-r--r--upd8/strings-default.json (renamed from strings-default.json)0
-rw-r--r--upd8/util.js (renamed from upd8-util.js)0
6 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 9bc0d286..f0e2493b 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ HSMusic, short for the *Homestuck Music Wiki*, is a revitalization and reimagini
 
 **Disclaimer:** most of the code here *sucks*. It's been shambled together over the course of over a year, and while we're fairly confident it's all at minimum functional, we can't guarantee the same about its understandability! Still, for the official release of [hsmusic.wiki][hsmusic], we've done our best to put together a codebase which is *somewhat* navigable. The description below summarizes it:
 
-* `upd8.js`: "Build" code for the site. Everything specific to generating the structure and HTML content of the website is conatined in this file. As expected, it's pretty massive.
+* `upd8`: "Build" code for the site. Everything specific to generating the structure and HTML content of the website is conatined in this folder. As expected, it's pretty massive, and is currently undergoing some much-belated restructuring.
 * `static`: Static code and supporting files. Everything here is wholly client-side and referenced by the generated HTML files.
 * `common`: Code which is depended upon by both client- and server-side code. For the most part, this is constants such as directory paths, though there are a few handy algorithms here too.
 * In the not quite so far past, we used to have `data` and `media` folders too. Today, for portability and convenience in project structure, those are saved in separate repositories, and you can pass hsmusic paths to them through the `--data` and `--media` options, or the `HSMUSIC_DATA` and `HSMUSIC_MEDIA` environment variables.
@@ -14,7 +14,7 @@ HSMusic, short for the *Homestuck Music Wiki*, is a revitalization and reimagini
   * Media directory: Images and other static files referenced by generated and static content across the site. Many of the files here are cover art, and their names match the automatically generated "kebab case" identifiers for tracks and albums (or a manually overridden one).
 * Same for the output root: previously it was in a `site` folder; today, use `--out` or `HSMUSIC_OUT`!
 
-The code process for upd8.js was politely introduced by 2019!us back when we were beginning the site, and it's essentially the same structure followed today. In summary:
+The upd8 code process was politely introduced by 2019!us back when we were beginning the site, and it's essentially the same structure followed today. In summary:
 
 1. Locate and read data files, processing them into relatively usable JS object-style formats. (The formats themselves are hard-coded and somewhat arbitrary, and are often extended when more or different data is useful.)
 2. Validate the data and show any errors that might've been caught during processing. (These aren't exhaustive test cases; they're designed to catch a majority of common errors and typos.)
diff --git a/package.json b/package.json
index aaaf8f68..80ee2c52 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
     "description": "static wiki software cataloguing collaborative creation",
     "main": "upd8.js",
     "bin": {
-        "hsmusic": "./upd8.js"
+        "hsmusic": "./upd8/main.js"
     },
     "dependencies": {
         "fix-whitespace": "^1.0.4",
diff --git a/gen-thumbs.js b/upd8/gen-thumbs.js
index 3887aaea..bec01d1d 100644
--- a/gen-thumbs.js
+++ b/upd8/gen-thumbs.js
@@ -92,7 +92,7 @@ const {
     progressPromiseAll,
     promisifyProcess,
     queue,
-} = require('./upd8-util');
+} = require('./util');
 
 function traverse(startDirPath, {
     filterFile = () => true,
diff --git a/upd8.js b/upd8/main.js
index e17005dd..84bab6c1 100755
--- a/upd8.js
+++ b/upd8/main.js
@@ -127,11 +127,11 @@ const {
     th,
     unique,
     withEntries
-} = require('./upd8-util');
+} = require('./util');
 
 const genThumbs = require('./gen-thumbs');
 
-const C = require('./common/common');
+const C = require('../common/common');
 
 const CACHEBUST = 5;
 
diff --git a/strings-default.json b/upd8/strings-default.json
index 7a948d64..7a948d64 100644
--- a/strings-default.json
+++ b/upd8/strings-default.json
diff --git a/upd8-util.js b/upd8/util.js
index 4c4186f7..4c4186f7 100644
--- a/upd8-util.js
+++ b/upd8/util.js