explorer-data/utils/build.js

15 lines
327 B
JavaScript
Raw Normal View History

2023-10-07 20:01:09 +02:00
import { W3PData } from "./w3pdata.js";
2023-10-07 20:48:35 +02:00
const w3pd = new W3PData();
await w3pd.init();
2023-10-07 20:01:09 +02:00
2023-10-07 20:48:35 +02:00
const outputDir = "./dist";
2023-10-07 20:01:09 +02:00
try {
2023-10-07 20:48:35 +02:00
await Deno.mkdir(outputDir);
2023-10-07 20:01:09 +02:00
} catch {}
2023-10-07 20:48:35 +02:00
const bundleFn = `${outputDir}/bundle.json`;
await Deno.writeTextFile(bundleFn, JSON.stringify(w3pd.data, null, 2));
console.log(`Bundle writed: ${bundleFn}`);