Skip to content

Commit

Permalink
diff-npm-package: create reports folder (graphql#3623)
Browse files Browse the repository at this point in the history
Co-authored-by: Saihajpreet Singh <[email protected]>
  • Loading branch information
yaacovCR and saihaj authored Jun 1, 2022
1 parent 338e3dd commit 7532a5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/diff-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if (diff === '') {
console.log('No changes found!');
} else {
const reportPath = localRepoPath('reports', 'npm-dist-diff.html');
if (!fs.existsSync(reportPath)) {
fs.mkdirSync(reportPath);
}
fs.writeFileSync(reportPath, generateReport(diff));
console.log('Report saved to: ', reportPath);
}
Expand Down

0 comments on commit 7532a5c

Please sign in to comment.