mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
Re-creation of https://github.com/Aurorastation/Aurora.3/pull/21046 to skip merge conflict hell. Brings us modern TGUI. **ALTERNATE TITLE: TGUI HELLSCAPE PR ABANDON ALL HOPE YE WHO ENTER HERE** - [x] Migrate build tools (javascript -> typescript, bun for package management). - [x] Upgrade all TGUI dependencies and associated root files to TG-congruent versions (axios, babel, dompurify, eslint, highlight, marked, prettier, sass, source-map, stacktrace-parser, typescript). - [x] InfernoJS -> React migrations - [x] React cleanup and polish (migrate all remaining .js files to appropriate .ts or .tsx filetype, all remaining hooks, linting, error corrections, etc.) - [ ] Test all remaining TGUI interfaces
12 lines
373 B
TypeScript
12 lines
373 B
TypeScript
export function formatDeps(text: string): Record<string, string> {
|
|
return text
|
|
.split("\n")
|
|
.map((statement) => statement.replace("export", "").trim())
|
|
.filter((value) => !(value === "" || value.startsWith("#")))
|
|
.map((statement) => statement.split("="))
|
|
.reduce((acc, kv_pair) => {
|
|
acc[kv_pair[0]] = kv_pair[1];
|
|
return acc;
|
|
}, {});
|
|
}
|