Quellcode durchsuchen

add log about removed artifacts in prepack.js

(cherry picked from commit dd6ec21951cfccc98ef6ea4ae84836dda7b5c5a1)
Francisco Giordano vor 6 Jahren
Ursprung
Commit
ca922c8fed
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      scripts/prepack.js

+ 5 - 0
scripts/prepack.js

@@ -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);
@@ -38,5 +40,8 @@ for (const artifact of fs.readdirSync(artifactsDir)) {
 
   if (ignore) {
     fs.unlinkSync(fullArtifactPath);
+    n += 1;
   }
 }
+
+console.error(`Removed ${n} mock artifacts`);