-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: read steam path from gradle
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import { resolve } from "@std/path" | ||
|
||
const readGradle = async (): Promise<Record<string, string>> => { | ||
const gradle = await Deno.readTextFile("gradle.properties") | ||
|
||
return Object.fromEntries(gradle.split("\n").map((line) => line.trim().split("="))) | ||
} | ||
|
||
const gradleProperties = await readGradle() | ||
|
||
export const root = import.meta.dirname! | ||
export const jar = resolve(root, "build", "libs", "MarisaContinued.jar") | ||
export const image = resolve("docs", "thumbnail", "image.jpg") | ||
|
||
export const home = Deno.env.get("HOME")! | ||
export const steam = resolve(home, ".steam", "steam", "steamapps", "common") | ||
export const steam = resolve(gradleProperties["userSteamDir"], "common") | ||
export const mod = resolve(steam, "SlayTheSpire", "MarisaContinued") |