pyth-crosschain/third_party/pyth/p2w-sdk/scripts/copyWasm.js

15 lines
305 B
JavaScript

const find = require("find");
const fs = require("fs");
const SOURCE_ROOT = "src";
const TARGET_ROOT = "lib";
find.eachfile(/\.wasm(\..*)?/, SOURCE_ROOT, file => {
copy = file.replace(SOURCE_ROOT, TARGET_ROOT);
console.log("copyWasm:", file, "to", copy);
fs.copyFileSync(file, copy);
});