bpms_site/.svn/pristine/ee/ee754becfab4f32273e4fe4a9a497a5a79cec326.svn-base
2025-11-02 16:38:49 +03:30

18 lines
481 B
Plaintext

import { readFileSync } from "fs";
const cache = new Map();
export function loadManifest(path, shouldCache = true) {
const cached = shouldCache && cache.get(path);
if (cached) {
return cached;
}
const manifest = JSON.parse(readFileSync(path, "utf8"));
if (shouldCache) {
cache.set(path, manifest);
}
return manifest;
}
export function clearManifestCache(path) {
return cache.delete(path);
}
//# sourceMappingURL=load-manifest.js.map