mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
fix: remove dead ternary in WORKSPACE_ROOT resolution (#487)
* fix: remove dead ternary in WORKSPACE_ROOT resolution
Both tools/dev and tools/pack config files had:
ENTRY_DIR_NAME === "dist" ? "../../.." : "../../.."
with identical branches. Since `src/` and `dist/` are siblings under
`tools/{dev,pack}/`, both resolve to the same path. The ternary and
ENTRY_DIR_NAME constant were dead code — simplify to "../..".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Fix workspace root depth
---------
Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: PerishCode <perishcode@gmail.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
Test User
PerishCode
parent
e8887aab13
commit
d55f05fcfa
@@ -19,9 +19,8 @@ import {
|
||||
} from "@open-design/sidecar";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ENTRY_DIR_NAME = path.basename(__dirname);
|
||||
|
||||
export const WORKSPACE_ROOT = path.resolve(__dirname, ENTRY_DIR_NAME === "dist" ? "../../.." : "../../..");
|
||||
export const WORKSPACE_ROOT = path.resolve(__dirname, "../../..");
|
||||
|
||||
export const ALL_APPS = [APP_KEYS.DAEMON, APP_KEYS.WEB, APP_KEYS.DESKTOP] as const;
|
||||
export const DEFAULT_START_APPS = [APP_KEYS.DAEMON, APP_KEYS.WEB, APP_KEYS.DESKTOP] as const;
|
||||
|
||||
@@ -10,9 +10,8 @@ import {
|
||||
import { resolveNamespace } from "@open-design/sidecar";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ENTRY_DIR_NAME = path.basename(__dirname);
|
||||
|
||||
export const WORKSPACE_ROOT = resolve(__dirname, ENTRY_DIR_NAME === "dist" ? "../../.." : "../../..");
|
||||
export const WORKSPACE_ROOT = resolve(__dirname, "../../..");
|
||||
|
||||
export type ToolPackPlatform = "mac" | "win" | "linux";
|
||||
export type ToolPackBuildOutput = "all" | "app" | "appimage" | "dir" | "dmg" | "nsis" | "zip";
|
||||
|
||||
Reference in New Issue
Block a user