Files
ohif-viewer/platform/cli/src/commands/utils/private/readPluginConfigFile.js
2025-05-27 10:51:12 +07:00

18 lines
333 B
JavaScript

import fs from 'fs';
export default function readPluginConfigFile() {
let fileContents;
try {
fileContents = fs.readFileSync('./pluginConfig.json', { flag: 'r' });
} catch (err) {
return; // File doesn't exist yet.
}
if (fileContents) {
fileContents = JSON.parse(fileContents);
}
return fileContents;
}