Skip to content

Commit

Permalink
feat: show wasm size after build
Browse files Browse the repository at this point in the history
Issue: BTC-0
  • Loading branch information
OttoAllmendinger committed Aug 14, 2024
1 parent 3eeb5d4 commit f4e2dd1
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 f4e2dd1

Please sign in to comment.