Skip to content

Commit

Permalink
Use bun for package management
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkshiift committed Oct 7, 2024
1 parent c1a1451 commit 36bc0cd
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 3,613 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,23 @@ jobs:
- name: Github checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
- uses: oven-sh/setup-bun@v2
with:
version: latest
bun-version: latest

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "pnpm"

- name: Set virtual store dir max length
run: pnpm config set virtual-store-dir-max-length 70

- name: Install Node dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Install electron-builder globally
run: pnpm add electron-builder -g
run: bun add electron-builder -g

- name: Build GoofCord
run: pnpm run build
run: bun run build

- name: Load Electron Cache
uses: actions/cache/restore@v4
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ To explore plugins and themes, head over to the Vencord category in the Discord
Have fun!

And if you want to compile it yourself, here's how:
1. Install [Node.js](https://nodejs.dev) and [pnpm](https://pnpm.io/installation#using-npm)
1. Install [Node.js](https://nodejs.dev) and [Bun](https://bun.sh/package-manager) for package management. You can use any package manager if you really want to, but Bun is recommended.
2. Grab the source code from the latest release. Getting it from the main branch is not recommended for a stable experience.
3. Open a command line in the directory of the source code
4. Install the dependencies with `pnpm install`
5. Package GoofCord with either `pnpm run packageWindows`, `pnpm run packageLinux` or `pnpm run packageMac`
4. Install the dependencies with `bun install`
5. Package GoofCord with either `bun run packageWindows`, `bun run packageLinux` or `bun run packageMac`
6. Find your freshly compiled app in the `dist` folder.

## Short FAQ
Expand Down
Binary file added bun.lockb
Binary file not shown.
241 changes: 122 additions & 119 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,121 +1,124 @@
{
"name": "goofcord",
"version": "1.7.1",
"description": "Take control of your Discord experience with GoofCord – the highly configurable and privacy-minded discord client.",
"main": "ts-out/main.js",
"scripts": {
"build": "node --experimental-strip-types src/build/build.cts",
"start": "pnpm run build --dev && electron ./ts-out/main.js --dev --ozone-platform-hint=auto",
"startWithLoginFix": "pnpm run fixLogin && pnpm run build --dev && electron ./ts-out/main.js --dev --ozone-platform-hint=auto",
"packageLinux": "pnpm run build && electron-builder --linux",
"packageWindows": "pnpm run build && electron-builder --win",
"packageMac": "pnpm run build && electron-builder --mac",
"fixLogin": "rm -rf ~/.config/Electron/Local\\ Storage && cp -r ~/.config/goofcord/Local\\ Storage ~/.config/Electron/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Milkshiift/GoofCord"
},
"author": "MilkShift",
"license": "OSL-3.0",
"bugs": {
"url": "https://github.com/Milkshiift/GoofCord/issues"
},
"homepage": "https://github.com/Milkshiift/GoofCord",
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@types/node": "^22.7.4",
"@types/stegcloak": "^1.0.2",
"electron": "^32.1.2",
"electron-builder": "^25.1.7",
"esbuild": "^0.24.0",
"source-map-support": "^0.5.21",
"typescript": "^5.6.2"
},
"dependencies": {
"arrpc": "github:Milkshiift/arrpc",
"auto-launch": "^5.0.6",
"chalk": "^5.3.0",
"electron-context-menu": "github:Milkshiift/electron-context-menu",
"stegcloak": "github:Milkshiift/stegcloak-node",
"v8-compile-cache": "^2.4.0"
},
"build": {
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"nsis": {
"include": "build/installer.nsh",
"artifactName": "${productName} Setup ${arch}.${ext}"
},
"appId": "io.github.milkshiift.GoofCord",
"productName": "GoofCord",
"files": [
"!*",
"!node_modules/**/*",
"ts-out",
"package.json",
"LICENSE"
],
"linux": {
"icon": "build/icon.icns",
"category": "Network",
"maintainer": "MilkShift",
"target": [
{
"target": "AppImage",
"arch": [
"x64",
"arm64",
"armv7l"
]
}
],
"executableArgs": [
"--enable-features=UseOzonePlatform,WaylandWindowDecorations",
"--ozone-platform-hint=auto"
],
"desktop": {
"Name": "GoofCord",
"GenericName": "Internet Messenger",
"Type": "Application",
"Categories": "Network;InstantMessaging;Chat;",
"Keywords": "discord;goofcord;electron;chat;",
"MimeType": "x-scheme-handler/discord"
}
},
"win": {
"icon": "build/icon.ico",
"target": [
{
"target": "NSIS",
"arch": [
"x64",
"ia32",
"arm64"
]
}
]
},
"mac": {
"category": "public.app-category.social-networking",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64"
]
}
],
"icon": "build/icon.icns",
"extendInfo": {
"NSMicrophoneUsageDescription": "This app needs access to the microphone",
"NSCameraUsageDescription": "This app needs access to the camera",
"com.apple.security.device.audio-input": true,
"com.apple.security.device.camera": true
}
}
},
"engines": {
"node": ">=21.0.0"
}
"name": "goofcord",
"version": "1.7.1",
"description": "Take control of your Discord experience with GoofCord – the highly configurable and privacy-minded discord client.",
"main": "ts-out/main.js",
"scripts": {
"build": "node --experimental-strip-types src/build/build.cts",
"start": "bun run build --dev && electron ./ts-out/main.js --dev --ozone-platform-hint=auto",
"startWithLoginFix": "bun run fixLogin && pnpm run build --dev && electron ./ts-out/main.js --dev --ozone-platform-hint=auto",
"packageLinux": "bun run build && electron-builder --linux",
"packageWindows": "bun run build && electron-builder --win",
"packageMac": "bun run build && electron-builder --mac",
"fixLogin": "rm -rf ~/.config/Electron/Local\\ Storage && cp -r ~/.config/goofcord/Local\\ Storage ~/.config/Electron/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Milkshiift/GoofCord"
},
"author": "MilkShift",
"license": "OSL-3.0",
"bugs": {
"url": "https://github.com/Milkshiift/GoofCord/issues"
},
"homepage": "https://github.com/Milkshiift/GoofCord",
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@types/node": "^22.7.4",
"@types/stegcloak": "^1.0.2",
"electron": "^32.1.2",
"electron-builder": "^25.1.7",
"esbuild": "^0.24.0",
"source-map-support": "^0.5.21",
"typescript": "^5.6.2"
},
"dependencies": {
"arrpc": "github:Milkshiift/arrpc",
"auto-launch": "^5.0.6",
"chalk": "^5.3.0",
"electron-context-menu": "github:Milkshiift/electron-context-menu",
"stegcloak": "github:Milkshiift/stegcloak-node",
"v8-compile-cache": "^2.4.0"
},
"build": {
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"nsis": {
"include": "build/installer.nsh",
"artifactName": "${productName} Setup ${arch}.${ext}"
},
"appId": "io.github.milkshiift.GoofCord",
"productName": "GoofCord",
"files": [
"!*",
"!node_modules/**/*",
"ts-out",
"package.json",
"LICENSE"
],
"linux": {
"icon": "build/icon.icns",
"category": "Network",
"maintainer": "MilkShift",
"target": [
{
"target": "AppImage",
"arch": [
"x64",
"arm64",
"armv7l"
]
}
],
"executableArgs": [
"--enable-features=UseOzonePlatform,WaylandWindowDecorations",
"--ozone-platform-hint=auto"
],
"desktop": {
"Name": "GoofCord",
"GenericName": "Internet Messenger",
"Type": "Application",
"Categories": "Network;InstantMessaging;Chat;",
"Keywords": "discord;goofcord;electron;chat;",
"MimeType": "x-scheme-handler/discord"
}
},
"win": {
"icon": "build/icon.ico",
"target": [
{
"target": "NSIS",
"arch": [
"x64",
"ia32",
"arm64"
]
}
]
},
"mac": {
"category": "public.app-category.social-networking",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64"
]
}
],
"icon": "build/icon.icns",
"extendInfo": {
"NSMicrophoneUsageDescription": "This app needs access to the microphone",
"NSCameraUsageDescription": "This app needs access to the camera",
"com.apple.security.device.audio-input": true,
"com.apple.security.device.camera": true
}
}
},
"engines": {
"node": ">=21.0.0"
},
"trustedDependencies": [
"@biomejs/biome"
]
}
Loading

0 comments on commit 36bc0cd

Please sign in to comment.