Skip to content

Commit

Permalink
add log about removed artifacts in prepack.js
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed May 15, 2019
1 parent cc19ccf commit dd6ec21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/prepack.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const ignorePatterns = pkgFiles

const artifactsDir = 'build/contracts';

let n = 0;

for (const artifact of fs.readdirSync(artifactsDir)) {
const fullArtifactPath = path.join(artifactsDir, artifact);
const { sourcePath: fullSourcePath } = readJSON(fullArtifactPath);
Expand All @@ -38,5 +40,8 @@ for (const artifact of fs.readdirSync(artifactsDir)) {

if (ignore) {
fs.unlinkSync(fullArtifactPath);
n += 1;
}
}

console.error(`Removed ${n} mock artifacts`);

0 comments on commit dd6ec21

Please sign in to comment.