Skip to content

Commit

Permalink
Fix webpack error
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-kraemer committed Sep 8, 2024
1 parent 0993e0a commit 0416664
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/metadata/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ function filenameToVersion(filename) {
const metadataModules = require.context(".", false, /\.jsx$/)

// convert metadata file names to versions
const versions = metadataModules.keys()
export const versions = metadataModules.keys()
.map(filenameToVersion)
.sort()
.reverse()

// read metadata
const metadata = metadataModules.keys().map(m => {
export const metadata = metadataModules.keys().map(m => {
let version = filenameToVersion(m)
return { version, metadata: metadataModules(m).default }
}).sort((a, b) => {
Expand All @@ -24,16 +24,10 @@ const metadata = metadataModules.keys().map(m => {
})

// get latest release
let latestRelease
export let latestRelease
for (let i = metadata.length - 1; i >= 0; --i) {
if (!metadata[i].metadata.prerelease) {
latestRelease = metadata[i]
break
}
}

module.exports = {
metadata,
versions,
latestRelease
}

0 comments on commit 0416664

Please sign in to comment.