Skip to content

Commit

Permalink
cleanup preparedata
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Sep 2, 2023
1 parent 0a26c97 commit b7b1d08
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions scripts/prepareData.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,16 @@ for (const [major, versions] of Object.entries(grouped)) {
}
contents += '})'

build({
await build({
bundle: true,
outfile: `dist/mc-data/${major}.js`,
// entryPoints: ['mcData.js'],
stdin: {
contents,

resolveDir: dirname(require.resolve('minecraft-data')),
sourcefile: `mcData${major}.js`,
loader: 'js',
},
plugins: [
// {
// name: 'mcData',
// setup (build) {
// build.onResolve({
// filter: /^mcData\.js$/,
// }, ({ path, pluginData }) => {
// return {
// path,
// namespace: 'mc-data',
// }
// })
// build.onLoad({
// filter: /.*/,
// namespace: 'mc-data',
// }, ({ namespace, path }) => {
// const version = path.split('/')[2]
// const data = versions[version]
// if (!data) throw new Error(`No data for ${version}`)
// return {
// contents: `export const data = ${JSON.stringify(data, null, 2)}`,
// loader: 'js',
// }
// })
// }
// }
],
})
}
console.log('data prepared')

0 comments on commit b7b1d08

Please sign in to comment.