Add electron-builder packaging configuration
- Install electron-builder as dev dependency - Configure build targets for macOS (dmg, zip), Windows (nsis, zip), and Linux (AppImage, deb) - Add npm scripts for building unpacked app (dist:dir) and macOS packages (dist:mac) - Set base path to "./" in production builds for proper asset loading in packaged app - Fix index.html asset paths to use relative paths (./ prefix) - Update README to document packaging commands and note unsigned/unnotarized status
This commit is contained in:
40
package.json
40
package.json
@@ -2,6 +2,7 @@
|
||||
"name": "nextcloud-notes-tauri",
|
||||
"private": true,
|
||||
"version": "0.2.2",
|
||||
"description": "Desktop client for Nextcloud Notes built with Electron, React, and TypeScript.",
|
||||
"type": "module",
|
||||
"main": "electron/main.cjs",
|
||||
"scripts": {
|
||||
@@ -11,6 +12,8 @@
|
||||
"dev:desktop": "concurrently -k \"npm:dev:renderer\" \"npm:dev:electron\"",
|
||||
"build": "tsc && vite build",
|
||||
"desktop": "electron .",
|
||||
"dist:dir": "npm run build && electron-builder --dir",
|
||||
"dist:mac": "npm run build && electron-builder --mac dmg zip",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
@@ -42,10 +45,47 @@
|
||||
"concurrently": "^9.2.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"electron": "^37.3.1",
|
||||
"electron-builder": "^26.8.1",
|
||||
"postcss": "^8.5.8",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"typescript": "~5.8.3",
|
||||
"vite": "^7.0.4",
|
||||
"wait-on": "^8.0.5"
|
||||
},
|
||||
"build": {
|
||||
"appId": "cz.davidrelich.nextcloud-notes-desktop",
|
||||
"productName": "Nextcloud Notes Desktop",
|
||||
"directories": {
|
||||
"output": "release"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"electron/**/*",
|
||||
"package.json"
|
||||
],
|
||||
"asar": true,
|
||||
"npmRebuild": false,
|
||||
"mac": {
|
||||
"category": "public.app-category.productivity",
|
||||
"icon": "src-tauri/icons/icon.icns",
|
||||
"target": [
|
||||
"dmg",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"icon": "src-tauri/icons/icon.ico",
|
||||
"target": [
|
||||
"nsis",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
"icon": "src-tauri/icons/icon.png",
|
||||
"target": [
|
||||
"AppImage",
|
||||
"deb"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user