Skip to content

Commit

Permalink
Merge pull request #30 from BitGo/show-wasm-sizes
Browse files Browse the repository at this point in the history
feat: show wasm size after build
  • Loading branch information
OttoAllmendinger authored Aug 21, 2024
2 parents e9b1098 + f4e2dd1 commit 99ce7fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/wasm-miniscript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ define REMOVE_GITIGNORE
find $(1) -name .gitignore -delete
endef

define SHOW_WASM_SIZE
@find $(1) -name "*.wasm" -exec gzip -k {} \;
@find $(1) -name "*.wasm" -exec du -h {} \;
@find $(1) -name "*.wasm.gz" -exec du -h {} \;
endef

define BUILD
rm -rf $(1)
$(call WASM_PACK_COMMAND,$(1),$(2))
$(call REMOVE_GITIGNORE,$(1))
$(call SHOW_WASM_SIZE,$(1))
endef

.PHONY: js/wasm/
Expand Down

0 comments on commit 99ce7fb

Please sign in to comment.