From 9debdc0bbc1bec777abcac6c5c7c08cb8fa6397e Mon Sep 17 00:00:00 2001 From: LLLXY Date: Tue, 21 Feb 2023 21:04:53 +0000 Subject: [PATCH] fixed pkg package error --- .gitignore | 1 + package.json | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4bbcc78..f4e2166 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules .vscode .history examples/moddef.json +bin \ No newline at end of file diff --git a/package.json b/package.json index 9440868..474fc9d 100644 --- a/package.json +++ b/package.json @@ -8,16 +8,28 @@ "lint": "eslint \"**/*.{js,ts}\"", "lint-fix": "eslint --fix \"**/*.{js,ts}\"", "prepare": "husky install", - "pkgwin": "pkg . -t node14-win-x64 -o app", - "pkglinux": "pkg . -t node14-linux-x64 -o app", - "pkgmacos": "pkg . -t node14-macos-x64 -o app" + "pkgwin": "node_modules/.bin/pkg . -t node14-win-x64 -C GZip -o bin/app --no-bytecode", + "pkglinux": "node_modules/.bin/pkg . -t node14-linux-x64 -C GZip -o bin/app --no-bytecode", + "pkgmacos": "node_modules/.bin/pkg . -t node14-macos-x64 -C GZip -o bin/sapp --no-bytecode" }, "bin": "./app.js", "pkg": { "scripts": "module/*.js", "assets": [ - "/node_modules/vm2/lib/contextify.js", - "/public" + "node_modules/axios", + "node_modules/express", + "node_modules/express-fileupload", + "node_modules/md5", + "node_modules/music-metadata", + "node_modules/pac-proxy-agent", + "node_modules/qrcode", + "node_modules/safe-decode-uri-component", + "node_modules/tunnel", + "node_modules/yargs", + "node_modules/tslib", + "node_modules/vm2", + "module", + "public" ] }, "keywords": [ @@ -77,6 +89,7 @@ "intelli-espower-loader": "1.1.0", "lint-staged": "12.1.7", "mocha": "10.0.0", + "pkg": "^5.8.0", "power-assert": "1.6.1", "prettier": "2.7.1", "typescript": "4.5.2"