mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
migrate postinstall from py to js
This commit is contained in:
parent
aedb08d939
commit
a66f5a845f
4 changed files with 11 additions and 10 deletions
1
.eslintignore
Normal file
1
.eslintignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
postinstall.js
|
|
@ -18,7 +18,7 @@
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"format": "prettier . --write",
|
"format": "prettier . --write",
|
||||||
"postinstall": "python3 ./postinstall.py"
|
"postinstall": "node ./postinstall.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-forge/cli": "^7.3.0",
|
"@electron-forge/cli": "^7.3.0",
|
||||||
|
|
9
postinstall.js
Normal file
9
postinstall.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
const fs = require("fs")
|
||||||
|
|
||||||
|
if (process.platform === "win32"){
|
||||||
|
if (!fs.existsSync("resources/dist")) {
|
||||||
|
fs.mkdirSync("resources/dist")
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.copyFileSync("node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe", "resources/dist/fastlist.exe")
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
import shutil
|
|
||||||
import platform
|
|
||||||
import os
|
|
||||||
|
|
||||||
if platform.system() == "Windows":
|
|
||||||
if not os.path.exists("resources/dist"):
|
|
||||||
os.mkdir("resources/dist")
|
|
||||||
|
|
||||||
shutil.copy("node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe", "resources/dist/fastlist.exe")
|
|
Loading…
Reference in a new issue