Skip to content

Commit

Permalink
fix: only create d.ts files for contract artifacts (#7307)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr authored Jul 3, 2024
1 parent f401a9a commit b5e2a67
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export = circuit;
const target = fileURLToPath(new URL('../../artifacts', import.meta.url).href);
const files = await readdir(target);
for (const file of files) {
// guard against running this script twice without cleaning the artifacts/ dir first
if (!file.endsWith('.json')) {
continue;
}
const name = file.replace('.json', '');
await writeFile(join(target, `${name}.d.json.ts`), content);
}

0 comments on commit b5e2a67

Please sign in to comment.