We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b18e0ad commit 7284049Copy full SHA for 7284049
packages/wasm-miniscript/Makefile
@@ -1,4 +1,5 @@
1
WASM_PACK = wasm-pack
2
+WASM_OPT = wasm-opt
3
WASM_PACK_FLAGS = --no-pack --weak-refs
4
5
ifdef WASM_PACK_DEV
@@ -9,6 +10,10 @@ define WASM_PACK_COMMAND
9
10
$(WASM_PACK) build --no-opt --out-dir $(1) $(WASM_PACK_FLAGS) --target $(2)
11
endef
12
13
+define WASM_OPT_COMMAND
14
+ $(WASM_OPT) -Oz $(1)/*.wasm -o $(1)/*.wasm
15
+endef
16
+
17
define REMOVE_GITIGNORE
18
find $(1) -name .gitignore -delete
19
@@ -22,6 +27,7 @@ endef
22
27
define BUILD
23
28
rm -rf $(1)
24
29
$(call WASM_PACK_COMMAND,$(1),$(2))
30
+ $(call WASM_OPT_COMMAND,$(1))
25
31
$(call REMOVE_GITIGNORE,$(1))
26
32
$(call SHOW_WASM_SIZE,$(1))
33
0 commit comments