Files: 4af0630e844fe5c816f308e0ce8210d97c227951 / tests / buildTests.js
350 bytesRaw
1 | const wast2wasm = require('wast2wasm') |
2 | const fs = require('fs') |
3 | |
4 | const files = fs.readdirSync(`${__dirname}/wast`) |
5 | for (let file of files) { |
6 | const wast = fs.readFileSync(`${__dirname}/wast/${file}`).toString() |
7 | wast2wasm(wast).then(wasm => { |
8 | file = file.split('.')[0] |
9 | fs.writeFileSync(`${__dirname}/wasm/${file}.wasm`, wasm.buffer) |
10 | }) |
11 | } |
12 |
Built with git-ssb-web