v3mt
Version:
A CLI toolkit for managing and deploying Victoria 3 mods, including sending mod files to the game, launching the game, and more.
14 lines (13 loc) • 318 B
JavaScript
import fs from 'fs';
import path from 'path';
export function readVic3Metadata(filePath) {
try {
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
}
catch {
return null;
}
}
export function getModFolderFromMetadataPath(filePath) {
return path.dirname(path.dirname(filePath));
}