This commit is contained in:
Guilherme Werner 2024-01-28 14:05:28 -03:00
parent 91a38084d2
commit 9feb35e358
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
const { GameDig } = require('../dist/index.cjs')
// Instead of '../lib/index.js' you would have here 'gamedig'.
// Instead of '../dist/index.cjs' you would have here 'gamedig'.
GameDig.query({
type: 'minecraft',

View file

@ -4,7 +4,7 @@
"scripts": {
"lint:check": "eslint .",
"lint:fix": "eslint --fix .",
"prepare ": "npm run build",
"prepare": "npm run build",
"build": "node tools/esbuild.js"
},
"keywords": [

View file

@ -4,7 +4,7 @@ import { nodeExternalsPlugin } from 'esbuild-node-externals'
const buildConfig = {
entryPoints: ['lib/index.js'],
platform: 'node',
target: 'node14',
target: 'node16',
bundle: true,
outfile: 'dist/index.cjs',
format: 'cjs',
@ -12,4 +12,4 @@ const buildConfig = {
plugins: [nodeExternalsPlugin({ allowList: ['got'] })]
}
build(buildConfig).then(() => { }).catch(() => { process.exit(1) })
build(buildConfig).then(() => { }).catch(() => { process.exit(1) })