(file)
| 91 | } |
| 92 | |
| 93 | async function buildDependencyTree(file) { |
| 94 | let code = await readFile(file); |
| 95 | code = code.toString('utf-8'); |
| 96 | |
| 97 | let dep = []; |
| 98 | const plugin = { |
| 99 | visitor: { |
| 100 | ImportDeclaration(decl) { |
| 101 | const importedFile = decl.node.source.value; |
| 102 | dep.push((async function() { |
| 103 | return await buildDependencyTree(`./app/${importedFile}`); |
| 104 | })()); |
| 105 | dep.push(importedFile); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | babel.transform(code, {plugins: [plugin]}); |
| 110 | return flatten(await Promise.all(dep)); |
| 111 | } |
| 112 | |
| 113 | async function extractEntryPoints() { |
| 114 | let sitemapString = await readFile('./app/sitemap.xml'); |
no test coverage detected