From 9f81855af35aaf1dc5ef3773e263b7a505c85396 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 3 Jun 2021 11:45:48 -0300 Subject: don't hard-code page build flags in upd8.js At the moment, they're hard-coded in page/index.js, which isn't exactly a *lot* 8etter....? 8ut this gets rid of a duplic8te place, at least! --- src/upd8.js | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/src/upd8.js b/src/upd8.js index a2262d6a..e6a880dc 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -5358,6 +5358,8 @@ async function main() { // disa8les the queue feature altogether. queueSize = +(miscOptions['queue-size'] ?? 0); + const buildDictionary = pageSpecs; + // NOT for ena8ling or disa8ling specific features of the site! // This is only in charge of what general groups of files to 8uild. // They're here to make development quicker when you're only working @@ -5366,17 +5368,9 @@ async function main() { const writeFlags = await parseOptions(process.argv.slice(2), { all: {type: 'flag'}, // Defaults to true if none 8elow specified. - album: {type: 'flag'}, - artist: {type: 'flag'}, - commentary: {type: 'flag'}, - flash: {type: 'flag'}, - group: {type: 'flag'}, - list: {type: 'flag'}, - misc: {type: 'flag'}, - news: {type: 'flag'}, - static: {type: 'flag'}, - tag: {type: 'flag'}, - track: {type: 'flag'}, + // Kinda a hack t8h! + ...Object.fromEntries(Object.keys(buildDictionary) + .map(key => [key, {type: 'flag'}])), [parseOptions.handleUnknown]: () => {} }); @@ -5388,24 +5382,6 @@ async function main() { await writeSymlinks(); await writeSharedFilesAndPages({strings: defaultStrings, wikiData}); - /* - const buildDictionary = { - misc: writeMiscellaneousPages, - news: writeNewsPages, - list: writeListingPages, - tag: writeTagPages, - commentary: writeCommentaryPages, - static: writeStaticPages, - group: writeGroupPages, - album: writeAlbumPages, - track: writeTrackPages, - artist: writeArtistPages, - flash: writeFlashPages - }; - */ - - const buildDictionary = pageSpecs; - const buildSteps = (writeAll ? Object.entries(buildDictionary) : (Object.entries(buildDictionary) -- cgit 1.3.0-6-gf8a5