(fileArg, label)
| 269 | } |
| 270 | |
| 271 | function readJson(fileArg, label) { |
| 272 | const path = resolveInputPath(fileArg) |
| 273 | if (!existsSync(path)) { |
| 274 | console.error(`Error: ${label} file not found: ${path}`) |
| 275 | process.exit(1) |
| 276 | } |
| 277 | return JSON.parse(readFileSync(path, 'utf8')) |
| 278 | } |
| 279 | |
| 280 | function writeJson(fileArg, data, label, pretty = false) { |
| 281 | const out = resolve(fileArg) |
no test coverage detected