Skip to content

Commit

Permalink
Fix index entry ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Jun 28, 2024
1 parent adc637b commit ec86a6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/make-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand All @@ -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}`);
}
Expand Down

0 comments on commit ec86a6a

Please sign in to comment.