()
| 50 | await updateTsconfig() |
| 51 | |
| 52 | async function updatePkgNames() { |
| 53 | for (const file of appsWithPkgJson) { |
| 54 | const pkgjsonPath = path.join(file, 'package.json') |
| 55 | const pkg = JSON.parse(await fs.promises.readFile(pkgjsonPath, 'utf8')) |
| 56 | pkg.name = relativeToWorkshopRoot(file).replace(/\\|\//g, '__sep__') |
| 57 | const written = await writeIfNeeded( |
| 58 | pkgjsonPath, |
| 59 | `${JSON.stringify(pkg, null, 2)}\n`, |
| 60 | ) |
| 61 | if (written) { |
| 62 | console.log(`updated ${path.relative(process.cwd(), pkgjsonPath)}`) |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | async function copyTestFiles() { |
| 68 | for (const app of exerciseApps) { |
no test coverage detected