From: Lady Date: Sun, 7 May 2023 04:27:05 +0000 (-0700) Subject: Switch sorting order X-Git-Tag: 0.2.3^0 X-Git-Url: https://git.ladys.computer/Beorn/commitdiff_plain/7946ec4dd08a94bc530b3b31ea54d6c892ac9ccc Switch sorting order Used to be ascending, but descending is more typical. --- diff --git a/build.js b/build.js index b6ab486..76f2083 100755 --- a/build.js +++ b/build.js @@ -1019,7 +1019,7 @@ await (async () => { // this is the run script isDirectory && /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/u.test(date) ).sort(({ name: a }, { name: b }) => // Sort the directories. - a < b ? -1 : a > b ? 1 : 0 + a < b ? 1 : a > b ? -1 : 0 ) ) { // Iterate over each dated directory and process its entries. @@ -1031,7 +1031,10 @@ await (async () => { // this is the run script isDirectory && //deno-lint-ignore no-control-regex !/[\x00-\x20\x22#%/<>?\\^\x60{|}\x7F]/u.test(entryName) - ).sort(({ name: a }, { name: b }) => a < b ? -1 : a > b ? 1 : 0) + ).sort(({ name: a }, { name: b }) => + // Sort the directories. + a < b ? 1 : a > b ? -1 : 0 + ) ) { // Iterate over each entry directory and process its contents. const entry = document.createElement("entry");