refactor(js): remove debug calls in bridge.js

pull/2/head
ALI Hamza 2021-03-21 10:59:02 +07:00
parent ef20dff682
commit f6d264ea40
Signed by: hamza
GPG Key ID: 22473A32291F8CB6
3 changed files with 2 additions and 5 deletions

@ -35,10 +35,8 @@ export default function (getBytes) {
return (...args) => { return (...args) => {
return new Promise(async (res, rej) => { return new Promise(async (res, rej) => {
while (bridge.__ready__ !== true) { while (bridge.__ready__ !== true) {
console.log("waiting")
await sleep() await sleep()
} }
console.log("done!")
if (typeof bridge[key] !== 'function') { if (typeof bridge[key] !== 'function') {
res(bridge[key]); res(bridge[key]);

@ -1,5 +1,5 @@
import wasm from './api/main.go'; import wasm from './api/main.go';
(async () => { (async () => {
console.log(await wasm.__ready__())
})() })()

@ -68,8 +68,7 @@ module.exports = function (source) {
if (!(await exists(__dirname, 'wasm_exec.js'))) { if (!(await exists(__dirname, 'wasm_exec.js'))) {
fs.copyFileSync(wasmOrigPath, wasmEmitPath) fs.copyFileSync(wasmOrigPath, wasmEmitPath)
} }
const contents = fs.readFileSync(outFile)
let contents = fs.readFileSync(outFile)
fs.unlinkSync(outFile) fs.unlinkSync(outFile)
const emitPath = path.basename(outFile) const emitPath = path.basename(outFile)