Skip to content

Commit

Permalink
No typescript. Just one index.html + wasm.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 5, 2019
1 parent fafc802 commit aa63303
Show file tree
Hide file tree
Showing 12 changed files with 143 additions and 333 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.sublime*
/docs/*.d.ts
/target
15 changes: 1 addition & 14 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ if ! [[ $(wasm-bindgen --version) ]]; then
cargo install -f wasm-bindgen-cli
fi

if ! [[ -f docs/webassembly.d.ts ]]; then
curl https://raw.githubusercontent.com/01alchemist/webassembly-types/master/webassembly.d.ts > docs/webassembly.d.ts
fi

BUILD=debug
# BUILD=release

# Clear output from old stuff:
# rm -rf docs/*.d.ts
rm -rf docs/*.js
rm -rf docs/*.wasm

function build_rust
Expand All @@ -28,15 +22,8 @@ function build_rust
FOLDER_NAME=${PWD##*/}
TARGET_NAME="emgui_wasm.wasm"
wasm-bindgen "target/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \
--out-dir docs --no-modules
--out-dir docs --no-modules --no-typescript
# --no-modules-global hoboho
}

build_rust

echo "Compile typescript:"
tsc

# wait || exit $?

# 3.4 s
Binary file modified docs/emgui_wasm_bg.wasm
Binary file not shown.
86 changes: 0 additions & 86 deletions docs/frontend.js

This file was deleted.

128 changes: 0 additions & 128 deletions docs/frontend.ts

This file was deleted.

Loading

0 comments on commit aa63303

Please sign in to comment.