()
| 149 | } |
| 150 | |
| 151 | async function findAllDistPaths(): Promise<string[]> { |
| 152 | const sourcePiecesPath = resolve(cwd(), 'packages', 'pieces') |
| 153 | const sourceFolders = await traverseFolder(sourcePiecesPath) |
| 154 | const distPaths: string[] = [] |
| 155 | for (const folder of sourceFolders) { |
| 156 | const distPath = join(folder, 'dist') |
| 157 | const distPackageJson = join(distPath, 'package.json') |
| 158 | if (existsSync(distPackageJson)) { |
| 159 | distPaths.push(distPath) |
| 160 | } |
| 161 | } |
| 162 | return distPaths |
| 163 | } |
| 164 | |
| 165 | async function traverseFolder(folderPath: string): Promise<string[]> { |
| 166 | const paths: string[] = [] |
no test coverage detected