| 280 | } |
| 281 | |
| 282 | function moveAnalysisFiles() { |
| 283 | const rendererReport = 'renderer.report.html' |
| 284 | const analysisSource = path.join(outRoot, rendererReport) |
| 285 | if (existsSync(analysisSource)) { |
| 286 | const distRoot = getDistRoot() |
| 287 | const destination = path.join(distRoot, rendererReport) |
| 288 | mkdirSync(distRoot, { recursive: true }) |
| 289 | // there's no moveSync API here, so let's do it the old fashioned way |
| 290 | // |
| 291 | // unlinkSync below ensures that the analysis file isn't bundled into |
| 292 | // the app by accident |
| 293 | cpSync(analysisSource, destination, { |
| 294 | recursive: true, |
| 295 | force: true, |
| 296 | verbatimSymlinks: true, |
| 297 | }) |
| 298 | unlinkSync(analysisSource) |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | function copyDependencies() { |
| 303 | const pkg: Package = require(path.join(projectRoot, 'app', 'package.json')) |