Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: added configurable base directory. #826

Mergedmcking-07(GitHub profile, opens in a new tab)merged 15 commits intomain fromrefs/pull/826/headmerged by juliusmarminge View on GitHub

Showing 37 changed files with 28 additions and 28 deletions (loading 34).

x
0 of 37 viewed, 37 left
1 addition and 1 deletion.docs/scripts.mdModified
View file
@@ -5,7 +5,7 @@
- `bun run dev:web` — Starts just the Vite dev server for the web app.
- Dev commands default `T3CODE_STATE_DIR` to `~/.t3/dev` to keep dev state isolated from desktop/prod state.
- Override server CLI-equivalent flags from root dev commands with `--`, for example:
- `bun run dev -- --state-dir ~/.t3/another-dev-state`
+ `bun run dev -- --base-dir ~/.t3-2`
- `bun run start` — Runs the production server (serves built web app as static files).
- `bun run build` — Builds contracts, web app, and server through Turbo.
- `bun run typecheck` — Strict TypeScript checks for all packages.
3 additions and 3 deletionsapps/desktop/src/main.tsModified
View file
@@ -56,8 +56,8 @@
const UPDATE_GET_STATE_CHANNEL = "desktop:update-get-state";
const UPDATE_DOWNLOAD_CHANNEL = "desktop:update-download";
const UPDATE_INSTALL_CHANNEL = "desktop:update-install";
-const STATE_DIR =
- process.env.T3CODE_STATE_DIR?.trim() || Path.join(OS.homedir(), ".t3", "userdata");
+const BASE_DIR = process.env.T3CODE_HOME?.trim() || Path.join(OS.homedir(), ".t3");
+const STATE_DIR = Path.join(BASE_DIR, "userdata");
const DESKTOP_SCHEME = "t3";
const ROOT_DIR = Path.resolve(__dirname, "../../..");
const isDevelopment = Boolean(process.env.VITE_DEV_SERVER_URL);
@@ -924,7 +924,7 @@
T3CODE_MODE: "desktop",
T3CODE_NO_BROWSER: "1",
T3CODE_PORT: String(backendPort),
- T3CODE_STATE_DIR: STATE_DIR,