(config)
| 304 | } |
| 305 | |
| 306 | function readConfigData(config) { |
| 307 | var data = readConfigFile(config), |
| 308 | json, |
| 309 | optionName, |
| 310 | optionValue, |
| 311 | args, |
| 312 | options = {}; |
| 313 | if (data) { |
| 314 | if (data.charAt(0) === "{") { |
| 315 | try { |
| 316 | json = JSON.parse(data); |
| 317 | data = ""; |
| 318 | for (optionName in json) { |
| 319 | if (json.hasOwnProperty(optionName)) { |
| 320 | optionValue = json[optionName]; |
| 321 | if (Array.isArray(optionValue)) { |
| 322 | optionValue = optionValue.join(","); |
| 323 | } |
| 324 | data += "--" + optionName + "=" + optionValue; |
| 325 | } |
| 326 | } |
| 327 | } catch (e) {} |
| 328 | } |
| 329 | args = data.replace(/\s+/g, "").split(/(?=--)/); |
| 330 | options = processArguments(args); |
| 331 | } |
| 332 | |
| 333 | return options; |
| 334 | } |
| 335 | |
| 336 | //----------------------------------------------------------------------------- |
| 337 | // Process command line |
no test coverage detected
searching dependent graphs…