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') 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({ GameDig.query({
type: 'minecraft', type: 'minecraft',

View file

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

View file

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