()
| 45 | } |
| 46 | |
| 47 | function loadMainConfigFile () { |
| 48 | const cachePath = getCacheDirectory (); |
| 49 | const configFilePath = path.join (cachePath, 'config.json'); |
| 50 | if (!fs.existsSync (configFilePath)) { |
| 51 | fs.writeFileSync (configFilePath, JSON.stringify (defaultConfig, null, 2)); |
| 52 | return defaultConfig; |
| 53 | } |
| 54 | |
| 55 | const configContent = JSON.parse (fs.readFileSync (configFilePath).toString ()); |
| 56 | return configContent; |
| 57 | } |
| 58 | |
| 59 | function saveConfigFile (config) { |
| 60 | const cachePath = getCacheDirectory (); |
no test coverage detected
searching dependent graphs…