Skip to content

Commit 96f3586

Browse files
committed
Build standalone executables
* Add build scripts * Add `pkg` as a dev dependency
1 parent 531ba74 commit 96f3586

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"test": "tests"
1111
},
1212
"scripts": {
13+
"build": "npm run build:linux && npm run build:osx && npm run build:windows",
14+
"build:linux": "pkg -t node14-linux -o dist/portal bin/portal.js",
15+
"build:osx": "pkg -t node14-osx -o dist/portal-osx bin/portal.js",
16+
"build:windows": "pkg -t node14-win -o dist/portal.exe bin/portal.js",
1317
"test": "echo \"Error: no test specified\" && exit 1"
1418
},
1519
"repository": {
@@ -42,5 +46,8 @@
4246
"random-access-memory": "^6.2.1",
4347
"random-port-promise": "^1.0.1",
4448
"sodium-universal": "^4.0.0"
49+
},
50+
"devDependencies": {
51+
"pkg": "^5.8.1"
4552
}
4653
}

0 commit comments

Comments
 (0)