* Loads optional arguments residing in a options.json file, if any. * * @param {string} inputFile * @return {!Object}
(inputFile)
| 115 | * @return {!Object} |
| 116 | */ |
| 117 | function loadOptions(inputFile) { |
| 118 | const transformDir = path.dirname(inputFile); |
| 119 | const optionsPath = path.join(transformDir, 'options.json'); |
| 120 | if (fs.existsSync(optionsPath)) { |
| 121 | return require(optionsPath); |
| 122 | } |
| 123 | return {}; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Logs a test error |