Skip to content

Commit

Permalink
refactor(examples): update browser example
Browse files Browse the repository at this point in the history
  • Loading branch information
ollelauribostrom committed May 8, 2019
1 parent ad5751f commit d5e7151
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/browser-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<title>browser-example</title>
</head>
<body>
<h1>Browser example</h1>
<p>Check the console</p>
</body>
</html>
3 changes: 1 addition & 2 deletions examples/browser-example/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const esmbly = require('@esmbly/core');
const Flow = require('@esmbly/transformer-flow');
const Wasm = require('@esmbly/transformer-wasm');
console.log(esmbly, Flow, Wasm)

const compile = content => {
return esmbly.run({
Expand Down Expand Up @@ -29,5 +28,5 @@ const program = `

compile(program)
.then(([{ content }]) => WebAssembly.instantiate(content, {}))
.then(({ instance }) => console.log(instance.exports.add(2, 3)))
.then(({ instance }) => console.log('2 + 3 = ' + instance.exports.add(2, 3)))
.catch(err => console.log(err));

0 comments on commit d5e7151

Please sign in to comment.