function getJson()

in src/plugman/util/metadata.js [25:35]


function getJson (pluginsDir) {
    if (!cachedJson) {
        const fetchJsonPath = path.join(pluginsDir, 'fetch.json');
        if (fs.existsSync(fetchJsonPath)) {
            cachedJson = JSON.parse(fs.readFileSync(fetchJsonPath, 'utf-8'));
        } else {
            cachedJson = {};
        }
    }
    return cachedJson;
}