From ec86a6aacfcc36d0960f2a1280b88d21bce8bc92 Mon Sep 17 00:00:00 2001 From: "James P." Date: Fri, 28 Jun 2024 08:28:19 -0500 Subject: [PATCH] Fix index entry ordering --- scripts/make-index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/make-index.js b/scripts/make-index.js index be42939e4..c6fb934f4 100755 --- a/scripts/make-index.js +++ b/scripts/make-index.js @@ -78,9 +78,9 @@ function computeEntries(path) { } const stats = statSync(path); - entries.set('/' + relative(resolvedRoot, path), stats); if (stats.isFile()) { + entries.set('/' + relative(resolvedRoot, path), stats); if (options.verbose) { console.log(`${color('green', 'file')} ${path}`); } @@ -90,6 +90,7 @@ function computeEntries(path) { for (const file of readdirSync(path)) { computeEntries(join(path, file)); } + entries.set('/' + relative(resolvedRoot, path), stats); if (options.verbose) { console.log(`${color('bright_green', ' dir')} ${path}`); }