Skip to content

Commit bfe7ae3

Browse files
bmoyroudelanh
authored andcommitted
Generate output.json file
1 parent e46f916 commit bfe7ae3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ node_modules
77
.env.template
88

99
# VSCode History Extension
10-
.history
10+
.history
11+
12+
output.json

parser/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async function main() {
6060
];
6161

6262
type Entry = {
63-
fileName: string;
63+
filename: string;
6464
chain: string;
6565
network: string;
6666
method: string;
@@ -100,7 +100,7 @@ async function main() {
100100
for (const [chain, networks] of chainsToNetworks) {
101101
for (const network of networks) {
102102
const entry = {
103-
fileName,
103+
filename: fileName,
104104
chain,
105105
network,
106106
method: method.toUpperCase(),
@@ -116,6 +116,8 @@ async function main() {
116116
}
117117
}
118118
console.log(`Generated ${entries.length} entries.`);
119+
const outputFilePath = path.join(__dirname, 'output.json');
120+
await fs.promises.writeFile(outputFilePath, JSON.stringify(entries, null, 2));
119121
}
120122

121123
main();

0 commit comments

Comments
 (0)