UNPKG

dmclc

Version:

Dolphin Minecraft Launcher Core

11 lines (10 loc) 472 B
import fs from "fs"; import { merge } from "./MergeVersionJSONs.js"; export function expandInheritsFrom(versionObject, rootPath) { let ret = versionObject; if (versionObject.inheritsFrom !== undefined) { const original = JSON.parse(fs.readFileSync(`${rootPath}/versions/${versionObject.inheritsFrom}/${versionObject.inheritsFrom}.json`).toString()); ret = merge(expandInheritsFrom(original, rootPath), versionObject, true); } return ret; }