Merge pull request #1706 from lixinyang123/master

解决 pkg 打包后无法运行
This commit is contained in:
binaryify 2023-02-22 09:19:24 +08:00 committed by GitHub
commit 23cceebdbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ node_modules
.vscode
.history
examples/moddef.json
bin

View File

@ -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"