Skip to content

Commit

Permalink
Fix calling init
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnagara committed Apr 16, 2019
1 parent fd25124 commit 40ceb73
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 592 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ build-gh-pages:
rm -rf docs
mkdir docs
cp static/index.html docs
mkdir docs/pkg
cp pkg/d0.js docs/pkg
cp pkg/d0_bg.wasm docs/pkg
cp -r pkg docs/pkg

build-static:
wasm-pack build --target web
Expand Down
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
</head>
<body>
<script type="module">
import { default as init } from './pkg/d0.js';
import { init_app, default as init } from './pkg/d0.js';
async function run() {
await init('./pkg/d0_bg.wasm');
init_app();
}
run();
</script>
Expand Down
Loading

0 comments on commit 40ceb73

Please sign in to comment.