« get me outta code hell

clean up imports & miscellaneous metastructures across codebase - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-19 14:13:31 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-19 14:13:31 -0300
commitef8acc5d50fa3c23bd7c9d4bb720b7ff78581981 (patch)
tree6c061e3771cb47619ce9163b559053504a000641 /src/content
parent37ef3f288fce9bd65a2cd86107239e22f977e78d (diff)
clean up imports & miscellaneous metastructures across codebase
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAlbumInfoPage.js5
-rw-r--r--src/content/dependencies/generateArtistGroupContributionsInfo.js7
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js10
-rw-r--r--src/content/dependencies/index.js10
-rw-r--r--src/content/dependencies/listAlbumsByDuration.js8
-rw-r--r--src/content/dependencies/listAlbumsByTracks.js7
-rw-r--r--src/content/dependencies/listArtistsByCommentaryEntries.js6
-rw-r--r--src/content/dependencies/listArtistsByContributions.js7
-rw-r--r--src/content/dependencies/listArtistsByDuration.js8
-rw-r--r--src/content/dependencies/listArtistsByName.js6
-rw-r--r--src/content/dependencies/listGroupsByAlbums.js6
-rw-r--r--src/content/dependencies/listGroupsByDuration.js8
-rw-r--r--src/content/dependencies/listGroupsByLatestAlbum.js8
-rw-r--r--src/content/dependencies/listGroupsByTracks.js7
-rw-r--r--src/content/dependencies/listTagsByUses.js7
-rw-r--r--src/content/dependencies/listTracksByDate.js6
-rw-r--r--src/content/dependencies/listTracksByDurationInAlbum.js8
-rw-r--r--src/content/dependencies/listTracksByTimesReferenced.js7
-rw-r--r--src/content/dependencies/transformContent.js6
-rw-r--r--src/content/util/groupTracksByGroup.js2
20 files changed, 30 insertions, 109 deletions
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js
index 992f817a..ce17ab21 100644
--- a/src/content/dependencies/generateAlbumInfoPage.js
+++ b/src/content/dependencies/generateAlbumInfoPage.js
@@ -1,6 +1,7 @@
-import getChronologyRelations from '../util/getChronologyRelations.js';
-import {sortAlbumsTracksChronologically} from '#wiki-data';
 import {empty} from '#sugar';
+import {sortAlbumsTracksChronologically} from '#wiki-data';
+
+import getChronologyRelations from '../util/getChronologyRelations.js';
 
 export default {
   contentDependencies: [
diff --git a/src/content/dependencies/generateArtistGroupContributionsInfo.js b/src/content/dependencies/generateArtistGroupContributionsInfo.js
index bc3992e2..1aa5dce6 100644
--- a/src/content/dependencies/generateArtistGroupContributionsInfo.js
+++ b/src/content/dependencies/generateArtistGroupContributionsInfo.js
@@ -1,9 +1,4 @@
-import {
-  empty,
-  filterProperties,
-  stitchArrays,
-  unique,
-} from '#sugar';
+import {empty, filterProperties, stitchArrays, unique} from '#sugar';
 
 export default {
   contentDependencies: ['linkGroup'],
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index 70106e30..334c5422 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -1,11 +1,7 @@
-import getChronologyRelations from '../util/getChronologyRelations.js';
-
-import {
-  sortAlbumsTracksChronologically,
-  sortFlashesChronologically,
-} from '#wiki-data';
-
 import {empty} from '#sugar';
+import {sortAlbumsTracksChronologically, sortFlashesChronologically} from '#wiki-data';
+
+import getChronologyRelations from '../util/getChronologyRelations.js';
 
 export default {
   contentDependencies: [
diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js
index 60408293..3bc34845 100644
--- a/src/content/dependencies/index.js
+++ b/src/content/dependencies/index.js
@@ -1,13 +1,13 @@
-import chokidar from 'chokidar';
-import {ESLint} from 'eslint';
-
 import EventEmitter from 'node:events';
 import {readdir} from 'node:fs/promises';
 import * as path from 'node:path';
 import {fileURLToPath} from 'node:url';
 
-import contentFunction, {ContentFunctionSpecError} from '../../content-function.js';
-import {color, logWarn} from '../../util/cli.js';
+import chokidar from 'chokidar';
+import {ESLint} from 'eslint';
+
+import {color, logWarn} from '#cli';
+import contentFunction, {ContentFunctionSpecError} from '#content-function';
 import {annotateFunction} from '#sugar';
 
 function cachebust(filePath) {
diff --git a/src/content/dependencies/listAlbumsByDuration.js b/src/content/dependencies/listAlbumsByDuration.js
index 73e78140..1f95f5e3 100644
--- a/src/content/dependencies/listAlbumsByDuration.js
+++ b/src/content/dependencies/listAlbumsByDuration.js
@@ -1,11 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  getTotalDuration,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, getTotalDuration, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkAlbum'],
diff --git a/src/content/dependencies/listAlbumsByTracks.js b/src/content/dependencies/listAlbumsByTracks.js
index 1b925d2b..abf3c3ff 100644
--- a/src/content/dependencies/listAlbumsByTracks.js
+++ b/src/content/dependencies/listAlbumsByTracks.js
@@ -1,10 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkAlbum'],
diff --git a/src/content/dependencies/listArtistsByCommentaryEntries.js b/src/content/dependencies/listArtistsByCommentaryEntries.js
index a041e0bd..4db9885e 100644
--- a/src/content/dependencies/listArtistsByCommentaryEntries.js
+++ b/src/content/dependencies/listArtistsByCommentaryEntries.js
@@ -1,9 +1,5 @@
 import {stitchArrays} from '#sugar';
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtist'],
diff --git a/src/content/dependencies/listArtistsByContributions.js b/src/content/dependencies/listArtistsByContributions.js
index ee876d58..86c8cfa2 100644
--- a/src/content/dependencies/listArtistsByContributions.js
+++ b/src/content/dependencies/listArtistsByContributions.js
@@ -1,10 +1,5 @@
 import {stitchArrays, unique} from '#sugar';
-
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtist'],
diff --git a/src/content/dependencies/listArtistsByDuration.js b/src/content/dependencies/listArtistsByDuration.js
index 5aeb8411..d6a18978 100644
--- a/src/content/dependencies/listArtistsByDuration.js
+++ b/src/content/dependencies/listArtistsByDuration.js
@@ -1,11 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  getTotalDuration,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, getTotalDuration, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtist'],
diff --git a/src/content/dependencies/listArtistsByName.js b/src/content/dependencies/listArtistsByName.js
index 2c85bb4f..6c0ad836 100644
--- a/src/content/dependencies/listArtistsByName.js
+++ b/src/content/dependencies/listArtistsByName.js
@@ -1,9 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  getArtistNumContributions,
-  sortAlphabetically,
-} from '#wiki-data';
+import {getArtistNumContributions, sortAlphabetically} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtist'],
diff --git a/src/content/dependencies/listGroupsByAlbums.js b/src/content/dependencies/listGroupsByAlbums.js
index 83fe5ce7..063b8269 100644
--- a/src/content/dependencies/listGroupsByAlbums.js
+++ b/src/content/dependencies/listGroupsByAlbums.js
@@ -1,9 +1,5 @@
 import {stitchArrays} from '#sugar';
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkGroup'],
diff --git a/src/content/dependencies/listGroupsByDuration.js b/src/content/dependencies/listGroupsByDuration.js
index dce4846e..e2a023e6 100644
--- a/src/content/dependencies/listGroupsByDuration.js
+++ b/src/content/dependencies/listGroupsByDuration.js
@@ -1,11 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  getTotalDuration,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, getTotalDuration, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkGroup'],
diff --git a/src/content/dependencies/listGroupsByLatestAlbum.js b/src/content/dependencies/listGroupsByLatestAlbum.js
index 84012cf9..fa223664 100644
--- a/src/content/dependencies/listGroupsByLatestAlbum.js
+++ b/src/content/dependencies/listGroupsByLatestAlbum.js
@@ -1,11 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  compareDates,
-  filterMultipleArrays,
-  sortChronologically,
-  sortMultipleArrays,
-} from '#wiki-data';
+import {compareDates, filterMultipleArrays, sortChronologically, sortMultipleArrays} from '#wiki-data';
 
 export default {
   contentDependencies: [
diff --git a/src/content/dependencies/listGroupsByTracks.js b/src/content/dependencies/listGroupsByTracks.js
index e105b991..b3c55ca2 100644
--- a/src/content/dependencies/listGroupsByTracks.js
+++ b/src/content/dependencies/listGroupsByTracks.js
@@ -1,10 +1,5 @@
 import {accumulateSum, stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkGroup'],
diff --git a/src/content/dependencies/listTagsByUses.js b/src/content/dependencies/listTagsByUses.js
index dae34048..98a50b89 100644
--- a/src/content/dependencies/listTagsByUses.js
+++ b/src/content/dependencies/listTagsByUses.js
@@ -1,10 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  sortAlphabetically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlphabetically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkArtTag'],
diff --git a/src/content/dependencies/listTracksByDate.js b/src/content/dependencies/listTracksByDate.js
index 94646822..d6546e67 100644
--- a/src/content/dependencies/listTracksByDate.js
+++ b/src/content/dependencies/listTracksByDate.js
@@ -1,9 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  chunkByProperties,
-  sortAlbumsTracksChronologically,
-} from '#wiki-data';
+import {chunkByProperties, sortAlbumsTracksChronologically} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkAlbum', 'linkTrack'],
diff --git a/src/content/dependencies/listTracksByDurationInAlbum.js b/src/content/dependencies/listTracksByDurationInAlbum.js
index db30ed06..4e83e921 100644
--- a/src/content/dependencies/listTracksByDurationInAlbum.js
+++ b/src/content/dependencies/listTracksByDurationInAlbum.js
@@ -1,11 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  filterMultipleArrays,
-  sortByCount,
-  sortChronologically,
-} from '#wiki-data';
+import {filterByCount, filterMultipleArrays, sortByCount, sortChronologically} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkAlbum', 'linkTrack'],
diff --git a/src/content/dependencies/listTracksByTimesReferenced.js b/src/content/dependencies/listTracksByTimesReferenced.js
index 3cb5a350..15a3461d 100644
--- a/src/content/dependencies/listTracksByTimesReferenced.js
+++ b/src/content/dependencies/listTracksByTimesReferenced.js
@@ -1,10 +1,5 @@
 import {stitchArrays} from '#sugar';
-
-import {
-  filterByCount,
-  sortAlbumsTracksChronologically,
-  sortByCount,
-} from '#wiki-data';
+import {filterByCount, sortAlbumsTracksChronologically, sortByCount} from '#wiki-data';
 
 export default {
   contentDependencies: ['generateListingPage', 'linkTrack'],
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index 3d93284d..9a5ac456 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -1,7 +1,7 @@
-import {marked} from 'marked';
+import {bindFind} from '#find';
+import {parseInput} from '#replacer';
 
-import {bindFind} from '../../util/find.js';
-import {parseInput} from '../../util/replacer.js';
+import {marked} from 'marked';
 
 export const replacerSpec = {
   album: {
diff --git a/src/content/util/groupTracksByGroup.js b/src/content/util/groupTracksByGroup.js
index 559967bc..4e189007 100644
--- a/src/content/util/groupTracksByGroup.js
+++ b/src/content/util/groupTracksByGroup.js
@@ -1,4 +1,4 @@
-import {empty} from '../../util/sugar.js';
+import {empty} from '#sugar';
 
 export default function groupTracksByGroup(tracks, groups) {
   const lists = new Map(groups.map(group => [group, []]));