copyWasm.js 305 B

1234567891011121314
  1. const find = require("find");
  2. const fs = require("fs");
  3. const SOURCE_ROOT = "src";
  4. const TARGET_ROOT = "lib";
  5. find.eachfile(/\.wasm(\..*)?/, SOURCE_ROOT, file => {
  6. copy = file.replace(SOURCE_ROOT, TARGET_ROOT);
  7. console.log("copyWasm:", file, "to", copy);
  8. fs.copyFileSync(file, copy);
  9. });