npm i -g pkg
修改配置文件
package.json
添加
“bin”:"./bin/www",
{
"name": "llt-publish-tool",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "nodemon ./bin/www"
},
"bin":"./bin/www",
"dependencies": {
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"ejs": "^3.1.5",
"express": "~4.16.1",
"http-errors": "~1.6.3",
"jade": "~1.11.0",
"morgan": "~1.9.1"
},
"devDependencies": {
"nodemon": "^2.0.6"
}
}
打包
win 是平台 具体哪些平台看
ackage.json 配置文件
pkg -t win package.json