Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_REDIRECT_URI=https://localhost:8888/callback
HONO_PORT=1234
SPOTIFY_REDIRECT_URI=https://127.0.0.1:1234/api/v1/spotify/callback
NODE_ENV=production
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start": "bun run src/index.ts",
"build:js": "bun build src/index.ts --outdir dist --target bun && cp hotkeys.json dist/hotkeys.json",
"build:linux": "bun build --compile --target=bun-linux-x64-baseline src/index.ts --outfile dist/linux/KeySpotic-linux",
"build:mac": "bun build --compile --target=bun‑darwin‑x64 src/index.ts --outfile dist/mac/KeySpotic-macos",
"build:win": "bun build --compile --target=bun‑windows‑x64 src/index.ts --outfile dist/win/KeySpotic-win.exe",
"build": "bun run build:linux && bun run build:mac && bun run build:win"
"build:win": "bun build --compile --target=bun-windows-x64 src/index.ts --outfile dist/win/KeySpotic-win.exe",
"postbuild": "bun run scripts/postbuild.ts",
"build": "bun run build:linux && bun run build:win && bun run postbuild"
},
"keywords": [
"spotify",
Expand Down
22 changes: 22 additions & 0 deletions scripts/postbuild.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { mkdirSync, cpSync } from "fs";
import { join } from "path";

const targets = ["linux", "mac", "win"];

for (const target of targets) {
const base = join("dist", target);

// Create directories if they don't exist
mkdirSync(base, { recursive: true });
mkdirSync(join(base, "certs"), { recursive: true });

// Copy common files
cpSync(".env.example", join(base, ".env.example"));
cpSync("hotkeys.json", join(base, "hotkeys.json"));

// Copy certificates
cpSync("certs/cert.pem", join(base, "certs/cert.pem"));
cpSync("certs/key.pem", join(base, "certs/key.pem"));

console.log(`Files copied for ${target}`);
}