MCPcopy Create free account
hub / github.com/ampproject/amphtml / getEntryPoint

Function getEntryPoint

build-system/tasks/dep-check.js:213–222  ·  view source on GitHub ↗

* @param {string} extensionFolder * @return {!Array }

(extensionFolder)

Source from the content-addressed store, hash-verified

211 * @return {!Array<string>}
212 */
213function getEntryPoint(extensionFolder) {
214 const extension = path.basename(extensionFolder);
215 return fs
216 .readdirSync(extensionFolder)
217 .map((x) => `${extensionFolder}/${x}`)
218 .filter((x) => fs.statSync(x).isDirectory())
219 .map((x) => `${x}/${extension}.js`)
220 .filter((x) => fs.existsSync(x))
221 .filter((x) => fs.statSync(x).isFile());
222}
223
224/**
225 * Flattens the module dependency graph and makes its entries unique. This

Callers

nothing calls this directly

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected