MCPcopy Index your code
hub / github.com/ampproject/amphtml / loadOptions

Function loadOptions

build-system/tasks/server-tests.js:117–124  ·  view source on GitHub ↗

* Loads optional arguments residing in a options.json file, if any. * * @param {string} inputFile * @return {!Object}

(inputFile)

Source from the content-addressed store, hash-verified

115 * @return {!Object}
116 */
117function 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

Callers 1

runTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected