diff --git a/electron-builder.json5 b/electron-builder.json5 deleted file mode 100644 index de18dbd..0000000 --- a/electron-builder.json5 +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @see https://www.electron.build/configuration/configuration - */ -{ - "$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", - "appId": "YourAppID", - "asar": true, - "productName": "hackernews", - "directories": { - "output": "release/electron/v${version}", - "buildResources":"build" - }, - "files": [ - "dist", - "dist-electron" - ], - "mac": { - "target": [ - "dmg" - ], - "artifactName": "${productName}-Mac-v${version}-Installer.${ext}" - }, - "win": { - "target": [ - { - "target": "nsis", - "arch": [ - "x64" - ] - } - ], - "artifactName": "${productName}-Windows-v${version}-Setup.${ext}" - }, - "nsis": { - "oneClick": false, - "perMachine": false, - "allowToChangeInstallationDirectory": true, - "deleteAppDataOnUninstall": false - }, - "linux": { - "target": [ - "AppImage" - ], - "artifactName": "${productName}-Linux-v${version}.${ext}" - } -} diff --git a/electron/main.ts b/electron/main.ts deleted file mode 100644 index 1af66a5..0000000 --- a/electron/main.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { app, BrowserWindow } from "electron" - -app.whenReady().then(() => { - const win = new BrowserWindow({ - width: 1200, - height: 800, - }) - - // You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve` - if (process.env.VITE_DEV_SERVER_URL) { - win.loadURL(process.env.VITE_DEV_SERVER_URL) - } else { - // Load your file - win.loadFile("dist/index.html") - } -}) diff --git a/package-lock.json b/package-lock.json index 84303d7..dda03b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,6 @@ "unocss": "^0.61.0", "unplugin-auto-import": "^0.17.6", "vite": "^5.3.1", - "vite-plugin-electron": "^0.28.7", "vite-plugin-vuetify": "^2.0.3", "vitest": "^1.6.0", "vue-tsc": "^2.0.21" @@ -10528,20 +10527,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite-plugin-electron": { - "version": "0.28.7", - "resolved": "https://registry.npmmirror.com/vite-plugin-electron/-/vite-plugin-electron-0.28.7.tgz", - "integrity": "sha512-wsiFUY9AN/HBwn6Jc+i7ehNQISAzUzy6p7NvgJJB1jKCNvZ7PyYlZloH0m3LWFkC+/dFDRGwW89kyAafRRPsLA==", - "dev": true, - "peerDependencies": { - "vite-plugin-electron-renderer": "*" - }, - "peerDependenciesMeta": { - "vite-plugin-electron-renderer": { - "optional": true - } - } - }, "node_modules/vite-plugin-vuetify": { "version": "2.0.3", "resolved": "https://registry.npmmirror.com/vite-plugin-vuetify/-/vite-plugin-vuetify-2.0.3.tgz", diff --git a/package.json b/package.json index ee243a5..f841cb3 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,8 @@ "version": "0.0.7", "type": "module", "private": true, - "main": "dist-electron/main.js", "scripts": { "dev": "vite", - "dev:electron": "VITE_LAUNCHING_ELECTRON='true' vite", "build": "run-p type-check build-only", "preview": "vite preview", "test:unit": "vitest", @@ -23,15 +21,6 @@ "sync": "npm run build && npm run sync-only", "build:apk-only": "bash -c 'source './.env' && cd ${CAPACITOR_ANDROID_PATH} && chmod +x ./gradlew && ./gradlew assembleDebug'", "sync-only": "cap sync", - "setUp:electron": "npm install --save-dev electron electron-builder", - "setUp:electron-noSave": "npm install --no-save electron electron-builder", - "pack:electron": "electron-builder --dir", - "build:electron": "npm run build && npm run build:electron-only", - "build:electron:linux": "npm run build && npm run build:electron:linux-only", - "build:electron:windows": "npm run build && npm run build:electron:windows-only", - "build:electron-only": "electron-builder --publish never", - "build:electron:linux-only": "electron-builder --linux --publish never", - "build:electron:windows-only": "electron-builder --windows --publish never", "prepare": "husky", "lint:staged": "npx lint-staged" }, @@ -83,7 +72,6 @@ "unocss": "^0.61.0", "unplugin-auto-import": "^0.17.6", "vite": "^5.3.1", - "vite-plugin-electron": "^0.28.7", "vite-plugin-vuetify": "^2.0.3", "vitest": "^1.6.0", "vue-tsc": "^2.0.21" diff --git a/vite.config.ts b/vite.config.ts index 49bde5a..aa9e126 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,8 +9,6 @@ import AutoImport from "unplugin-auto-import/vite" import UnoCSS from "unocss/vite" import vuetify from "vite-plugin-vuetify" -import electron from "vite-plugin-electron" - // https://vitejs.dev/config/ export default defineConfig({ plugins: [ @@ -58,14 +56,6 @@ export default defineConfig({ UnoCSS(), vuetify(), - electron({ - onstart(args) { - if (process.env.VITE_LAUNCHING_ELECTRON) { - args.startup([".", "--no-sandbox"]) - } - }, - entry: "electron/main.ts", - }), ], resolve: { alias: {