()
| 81 | }; |
| 82 | |
| 83 | const getIOSOutputPath = () => { |
| 84 | const podfile = glob |
| 85 | .sync("**/Podfile", { |
| 86 | cwd: projectRoot.replace(/^([a-zA-Z]+:|\.\/)/, ""), |
| 87 | deep: 10, |
| 88 | ignore: ["**/@(Pods|node_modules|Carthage|vendor|android)/**"], |
| 89 | }) |
| 90 | .find((project) => { |
| 91 | return path.dirname(project) === "ios"; |
| 92 | }); |
| 93 | |
| 94 | if (!podfile) { |
| 95 | return; |
| 96 | } |
| 97 | |
| 98 | const sourceDir = path.dirname(path.join(projectRoot, podfile)); |
| 99 | |
| 100 | const xcodeProjectName = fs |
| 101 | .readdirSync(sourceDir) |
| 102 | .sort() |
| 103 | .reverse() |
| 104 | .find((fileName) => { |
| 105 | const ext = path.extname(fileName); |
| 106 | return ext === ".xcodeproj" || ext === ".xcworkspace"; |
| 107 | }); |
| 108 | |
| 109 | if (xcodeProjectName == null) { |
| 110 | log.warn("No Xcode project found. Skipping iOS assets generation…"); |
| 111 | return; |
| 112 | } |
| 113 | |
| 114 | const iosOutputPath = path |
| 115 | .resolve(sourceDir, xcodeProjectName) |
| 116 | .replace(/\.(xcodeproj|xcworkspace)$/, ""); |
| 117 | |
| 118 | if (hfs.exists(iosOutputPath)) { |
| 119 | return iosOutputPath; |
| 120 | } |
| 121 | |
| 122 | log.warn( |
| 123 | `No ${path.relative( |
| 124 | cwd, |
| 125 | iosOutputPath, |
| 126 | )} directory found. Skipping iOS assets generation…`, |
| 127 | ); |
| 128 | }; |
| 129 | |
| 130 | const getHtmlTemplatePath = ({ html }: { html: string }) => { |
| 131 | const htmlTemplatePath = path.resolve(cwd, html); |
no outgoing calls
no test coverage detected
searching dependent graphs…