nexe instead of pkg

This commit is contained in:
vexorian 2020-07-28 15:38:47 -04:00
parent beade52dd0
commit 8e9d9e9a11
3 changed files with 24 additions and 16 deletions

View File

@ -43,7 +43,7 @@ RUN apk add --update \
WORKDIR /home/node/app
COPY package*.json ./
RUN npm install
RUN npm install -g browserify
RUN npm install -g browserify nexe
EXPOSE 8000
CMD [ "npm", "start"]
COPY . .

20
make_dist.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
WIN64=pseudotv-win-x64.exe
WIN32=pseudotv-win-x86.exe
MACOSX=pseudotv-macos-x64
LINUX64=pseudotv-linux-x64
npm run build
npm run compile
cp -R ./web ./dist/web
cp -R ./resources ./dist/
cd dist
nexe -r "./**/*" -t windows-x64-12.18.2 --output $WIN64
nexe -r "./**/*" -t linux-x64-12.16.2 --output $LINUX64
nexe -r "./**/*" -t mac-x64-12.18.2 --output $MACOSX
nexe -r "./**/*" -t windows-x86-12.18.2 --output $WIN32
echo dist/$WIN64
echo dist/$LINUX64
echo dist/$MACOSX
echo dist/WIN32

View File

@ -10,7 +10,7 @@
"dev-client": "watchify ./web/app.js -o ./web/public/bundle.js",
"dev-server": "nodemon index.js --ignore ./web/ --ignore ./db/ --ignore ./xmltv.xml",
"compile": "babel index.js -d dist && babel src -d dist/src",
"package": "copyfiles ./web/public/**/* ./dist && copyfiles ./resources/**/* ./dist && pkg . --out-path bin",
"package": "sh ./make_dist.sh",
"clean": "del-cli --force ./bin ./dist ./.pseudotv ./web/public/bundle.js"
},
"author": "Dan Ferguson",
@ -28,18 +28,6 @@
"xml-writer": "^1.7.0"
},
"bin": "dist/index.js",
"pkg": {
"assets": [
"dist/web/public/**/*",
"dist/resources/**/*"
],
"targets": [
"x64",
"linux",
"macos",
"windows"
]
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
@ -49,8 +37,8 @@
"copyfiles": "^2.2.0",
"del-cli": "^3.0.0",
"nodemon": "^2.0.3",
"pkg": "^4.4.7",
"watchify": "^3.11.1"
"watchify": "^3.11.1",
"nexe" : "^3.3.7"
},
"babel": {
"plugins": [