From 18fb8dcce873578ce7ce4579ac9877ca428ee4a7 Mon Sep 17 00:00:00 2001 From: Julien Bisconti Date: Mon, 25 Jun 2018 13:50:07 +0200 Subject: [PATCH] Fix sorting on updated --- buildMetadata.js | 2 +- buildTable.js | 7 +- ...2018-06-25T13.24.43-fetched_repo_data.json | 35051 ++++++++++++++++ data/latest | 2 +- website/index.js | 2 +- 5 files changed, 35056 insertions(+), 8 deletions(-) create mode 100644 data/2018-06-25T13.24.43-fetched_repo_data.json diff --git a/buildMetadata.js b/buildMetadata.js index 1d5f04f..69721d4 100644 --- a/buildMetadata.js +++ b/buildMetadata.js @@ -101,7 +101,7 @@ async function main() { printError, ); - const metadata = batchFetchRepoMetadata(githubRepos); + const metadata = await batchFetchRepoMetadata(githubRepos); await writeFile( GITHUB_METADATA_FILE, diff --git a/buildTable.js b/buildTable.js index ab86667..9cad43d 100644 --- a/buildTable.js +++ b/buildTable.js @@ -12,9 +12,7 @@ process.on('unhandledRejection', error => { console.log('unhandledRejection', error.message); }); -// const table = 'data/table.md'; const templateHTML = 'website/table.tmpl.html'; -// const merged = 'website/table.html'; const destination = 'website/table.html'; const valueNames = [ @@ -60,7 +58,7 @@ const formatEntry = ( description, homepage, stargazers_count: stargazers, - updated_at: updated, + pushed_at: updated, language, license, owner, @@ -73,7 +71,7 @@ const formatEntry = ( `

${description || '-'}

`, `

Last update: ${getLastUpdate( + } timestamp" data-timestamp="${updated}">Last code update: ${getLastUpdate( updated, )}

`, (homepage && @@ -109,7 +107,6 @@ function main() { `
`, ``, `

Sort by

${btn.join('')}
`, - // ``, `
`, '