diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..0854696d --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +postinstall.js \ No newline at end of file diff --git a/package.json b/package.json index 39029b30..b8396713 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "publish": "electron-forge publish", "lint": "eslint .", "format": "prettier . --write", - "postinstall": "python3 ./postinstall.py" + "postinstall": "node ./postinstall.js" }, "devDependencies": { "@electron-forge/cli": "^7.3.0", diff --git a/postinstall.js b/postinstall.js new file mode 100644 index 00000000..63b6399e --- /dev/null +++ b/postinstall.js @@ -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") +} diff --git a/postinstall.py b/postinstall.py deleted file mode 100644 index c55dca60..00000000 --- a/postinstall.py +++ /dev/null @@ -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")