Commit ca922c8f by Francisco Giordano

add log about removed artifacts in prepack.js

(cherry picked from commit dd6ec219)
parent ee7ff817
...@@ -29,6 +29,8 @@ const ignorePatterns = pkgFiles ...@@ -29,6 +29,8 @@ const ignorePatterns = pkgFiles
const artifactsDir = 'build/contracts'; const artifactsDir = 'build/contracts';
let n = 0;
for (const artifact of fs.readdirSync(artifactsDir)) { for (const artifact of fs.readdirSync(artifactsDir)) {
const fullArtifactPath = path.join(artifactsDir, artifact); const fullArtifactPath = path.join(artifactsDir, artifact);
const { sourcePath: fullSourcePath } = readJSON(fullArtifactPath); const { sourcePath: fullSourcePath } = readJSON(fullArtifactPath);
...@@ -38,5 +40,8 @@ for (const artifact of fs.readdirSync(artifactsDir)) { ...@@ -38,5 +40,8 @@ for (const artifact of fs.readdirSync(artifactsDir)) {
if (ignore) { if (ignore) {
fs.unlinkSync(fullArtifactPath); fs.unlinkSync(fullArtifactPath);
n += 1;
} }
} }
console.error(`Removed ${n} mock artifacts`);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment