From a83583081c70f1f164fffe4e43af46d540fe730d Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 21 May 2022 13:30:17 -0500 Subject: [PATCH] Sort apps by time by default --- helpers/build-app-list.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/helpers/build-app-list.js b/helpers/build-app-list.js index fa8a193..f2ac1d9 100644 --- a/helpers/build-app-list.js +++ b/helpers/build-app-list.js @@ -1,6 +1,3 @@ - -// import { promises as fs } from 'fs' - import fs from 'fs-extra' import MarkdownIt from 'markdown-it' import axios from 'axios' @@ -12,6 +9,7 @@ import parseDate from './parse-date' import { eitherMatches } from './matching.js' import { getAppEndpoint } from './app-derived' import { makeSlug } from './slug.js' +import { byTimeThenNull } from './sort-list.js' import { cliOptions @@ -440,16 +438,8 @@ export default async function () { // console.log('appList', appList) - return [ + return ([ ...appList, ...Array.from( scanListMap, ([name, value]) => value ) - ] - - // fs.readFile('../README.md', 'utf8') - // .then((err, data) => { - // const result = md.parse(data) - // console.log('result', result) - - // return result - // }) + ]).sort( byTimeThenNull ) }