Add Electron builder jazz
This commit is contained in:
parent
36d4e90113
commit
307051141d
7 changed files with 1186 additions and 27 deletions
1
.npmrc
Normal file
1
.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
node-linker=hoisted
|
8
.prettierrc.yaml
Normal file
8
.prettierrc.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
tabWidth: 4
|
||||
semi: true
|
||||
printWidth: 120
|
||||
trailingComma: none
|
||||
bracketSpacing: true
|
||||
arrowParens: avoid
|
||||
useTabs: false
|
||||
endOfLine: auto
|
BIN
build/icon.png
Normal file
BIN
build/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
8
build/installer.nsh
Normal file
8
build/installer.nsh
Normal file
|
@ -0,0 +1,8 @@
|
|||
!macro preInit
|
||||
SetRegView 64
|
||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$LocalAppData\VencordDesktop"
|
||||
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$LocalAppData\VencordDesktop"
|
||||
SetRegView 32
|
||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$LocalAppData\VencordDesktop"
|
||||
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$LocalAppData\VencordDesktop"
|
||||
!macroend
|
34
package.json
34
package.json
|
@ -3,22 +3,52 @@
|
|||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "dist/main.js",
|
||||
"main": "dist/js/main.js",
|
||||
"scripts": {
|
||||
"build": "tsx scripts/build.mts",
|
||||
"watch": "pnpm build --watch",
|
||||
"package": "pnpm build && electron-builder",
|
||||
"package:dir": "pnpm build && electron-builder --dir",
|
||||
"start": "pnpm build && electron .",
|
||||
"start:watch": "tsx scripts/startWatch.mts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [ ],
|
||||
"keywords": [],
|
||||
"author": "Vendicated <vendicated@riseup.net>",
|
||||
"license": "GPL-3.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.15.11",
|
||||
"electron": "^23.2.0",
|
||||
"electron-builder": "^23.6.0",
|
||||
"esbuild": "^0.17.14",
|
||||
"tsx": "^3.12.6",
|
||||
"typescript": "^5.0.2"
|
||||
},
|
||||
"build": {
|
||||
"appId": "dev.vencord.desktop",
|
||||
"productName": "Vencord Desktop",
|
||||
"mac": {
|
||||
"category": "Network"
|
||||
},
|
||||
"nsis": {
|
||||
"include": "build/installer.nsh"
|
||||
},
|
||||
"linux": {
|
||||
"category": "Network",
|
||||
"maintainer": "vendicated+vencord-desktop@riseup.net",
|
||||
"target": [
|
||||
"deb",
|
||||
"tar.gz",
|
||||
"rpm",
|
||||
"AppImage"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"!*",
|
||||
"dist/js",
|
||||
"static",
|
||||
"package.json",
|
||||
"LICENSE"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
1118
pnpm-lock.yaml
1118
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -19,12 +19,12 @@ await Promise.all([
|
|||
createContext({
|
||||
...NodeCommonOpts,
|
||||
entryPoints: ["src/main/index.ts"],
|
||||
outfile: "dist/main.js"
|
||||
outfile: "dist/js/main.js"
|
||||
}),
|
||||
createContext({
|
||||
...NodeCommonOpts,
|
||||
entryPoints: ["src/preload/index.ts"],
|
||||
outfile: "dist/preload.js"
|
||||
outfile: "dist/js/preload.js"
|
||||
})
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue