From ef8acc5d50fa3c23bd7c9d4bb720b7ff78581981 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 19 Aug 2023 14:13:31 -0300 Subject: clean up imports & miscellaneous metastructures across codebase --- src/page/album.js | 2 -- src/page/artist-alias.js | 3 --- src/page/artist.js | 7 ++----- src/page/flash.js | 5 +---- src/page/group.js | 11 +---------- src/page/homepage.js | 13 ------------- src/page/index.js | 9 --------- src/page/listing.js | 16 +++++----------- src/page/news.js | 2 -- src/page/static.js | 7 +++---- 10 files changed, 12 insertions(+), 63 deletions(-) (limited to 'src/page') diff --git a/src/page/album.js b/src/page/album.js index 3b2d02d..69fcabc 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -1,5 +1,3 @@ -// Album page specification. - export const description = `per-album info, artwork gallery & commentary pages`; export function targets({wikiData}) { diff --git a/src/page/artist-alias.js b/src/page/artist-alias.js index 23513ce..1da2af4 100644 --- a/src/page/artist-alias.js +++ b/src/page/artist-alias.js @@ -1,6 +1,3 @@ -// Artist alias redirect pages. -// (Makes old permalinks bring visitors to the up-to-date page.) - export const description = `redirects for aliased artist names`; export function targets({wikiData}) { diff --git a/src/page/artist.js b/src/page/artist.js index c53a491..27ff896 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -1,11 +1,8 @@ -// Artist page specification. -// -// NB: See artist-alias.js for artist alias redirect pages. - -import {empty} from '../util/sugar.js'; +import {empty} from '#sugar'; export const description = `per-artist info & artwork gallery pages`; +// NB: See artist-alias.js for artist alias redirect pages. export function targets({wikiData}) { return wikiData.artistData; } diff --git a/src/page/flash.js b/src/page/flash.js index 14e67d8..b9d27d0 100644 --- a/src/page/flash.js +++ b/src/page/flash.js @@ -1,7 +1,4 @@ -// Flash page and index specifications. - -import {empty} from '../util/sugar.js'; -import {getFlashLink} from '../util/wiki-data.js'; +import {empty} from '#sugar'; export const description = `flash & game pages`; diff --git a/src/page/group.js b/src/page/group.js index fa6c1c9..b0ed5ba 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -1,13 +1,4 @@ -// Group page specifications. - -import { - empty, -} from '../util/sugar.js'; - -import { - getTotalDuration, - sortChronologically, -} from '../util/wiki-data.js'; +import {empty} from '#sugar'; export const description = `per-group info & album gallery pages`; diff --git a/src/page/homepage.js b/src/page/homepage.js index 15dcadd..53ee6e4 100644 --- a/src/page/homepage.js +++ b/src/page/homepage.js @@ -1,16 +1,3 @@ -// Homepage specification. - -import { - bindOpts, - empty, - withEntries, -} from '../util/sugar.js'; - -import { - getNewAdditions, - getNewReleases, -} from '../util/wiki-data.js'; - export const description = `main wiki homepage`; export function pathsTargetless({wikiData}) { diff --git a/src/page/index.js b/src/page/index.js index e62241d..48e22d2 100644 --- a/src/page/index.js +++ b/src/page/index.js @@ -1,12 +1,3 @@ -// NB: This is the index for the page/ directory and contains exports for all -// other modules here! It's not the page spec for the homepage - see -// homepage.js for that. -// -// (TODO: The docs here from initial draft were totally outdated. -// We don't have docs for the new setup yet. -// Write those!!) -// - export * as album from './album.js'; export * as artist from './artist.js'; export * as artistAlias from './artist-alias.js'; diff --git a/src/page/listing.js b/src/page/listing.js index 64db413..bb22c21 100644 --- a/src/page/listing.js +++ b/src/page/listing.js @@ -1,19 +1,13 @@ -// Listing page specification. -// +export const description = `wiki-wide listing pages & index`; + // The targets here are a bit different than for most pages: rather than data // objects loaded from text files in the wiki data directory, they're hard- -// coded specifications, with various JS functions for processing wiki data -// and turning it into user-readable HTML listings. +// coded specifications, each directly identifying the hard-coded content +// function used to generate that listing. // // Individual listing specs are described in src/listing-spec.js, but are // provided via wikiData like other (normal) data objects. - -import {empty} from '../util/sugar.js'; - -import {getTotalDuration} from '../util/wiki-data.js'; - -export const description = `wiki-wide listing pages & index`; - +// export function targets({wikiData}) { return ( wikiData.listingSpec diff --git a/src/page/news.js b/src/page/news.js index 4928a11..194ffdc 100644 --- a/src/page/news.js +++ b/src/page/news.js @@ -1,5 +1,3 @@ -// News entry & index page specifications. - export const description = `per-entry news pages & index`; export function condition({wikiData}) { diff --git a/src/page/static.js b/src/page/static.js index 82330de..c9d806f 100644 --- a/src/page/static.js +++ b/src/page/static.js @@ -1,9 +1,8 @@ -// Static content page specification. (These are static pages coded into the -// wiki data folder, used for a variety of purposes, e.g. wiki info, -// changelog, and so on.) - export const description = `static wiki-wide content pages specified in data`; +// Static pages are written in the wiki's data folder and contain content and +// basic page metadata. They're used for a variety of purposes, such as an +// "about" page, a changelog, links to places beyond the wiki, and so on. export function targets({wikiData}) { return wikiData.staticPageData; } -- cgit 1.3.0-6-gf8a5