* Verifies that the sourcemap file exists, and returns its contents. * @param {string} map The map filepath to check * @return {!Object}
(map)
| 35 | * @return {!Object} |
| 36 | */ |
| 37 | function getSourcemapJson(map) { |
| 38 | if (!fs.existsSync(map)) { |
| 39 | log(red('ERROR:'), 'Could not find', cyan(map)); |
| 40 | throw new Error(`Could not find sourcemap file '${map}'`); |
| 41 | } |
| 42 | return JSON.parse(fs.readFileSync(map, 'utf8')); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Verifies that a correctly formatted sourcemap URL is present in v0.js.map. |
no test coverage detected