2023-01-03 21:12:41 +01:00
|
|
|
JSPKGMAN = "yarn"
|
|
|
|
ROOTDIR = $(dir $(CURDIR))
|
2023-01-03 17:03:08 +01:00
|
|
|
|
|
|
|
dev:
|
|
|
|
$(JSPKGMAN) run vite dev
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(JSPKGMAN) run vite check
|
|
|
|
|
2023-01-03 21:12:41 +01:00
|
|
|
build: wasm-build
|
2023-01-03 17:03:08 +01:00
|
|
|
$(JSPKGMAN) run vite build
|
2023-01-03 21:12:41 +01:00
|
|
|
|
|
|
|
wasm-pack:
|
|
|
|
wasm-pack build $(CURDIR)/wasm --target web
|
|
|
|
cp $(CURDIR)/wasm/pkg/crypttool_wasm_bg.wasm $(CURDIR)/src/lib/crypttool.wasm
|
|
|
|
|
|
|
|
#TODO get rid of -f and check whether files exist instead
|
|
|
|
clean:
|
|
|
|
rm -f $(CURDIR)/src/lib/crypttool.wasm
|
|
|
|
rm -rf $(CURDIR)/wasm/pkg/*
|
|
|
|
rm -rf $(CURDIR)/wasm/target/*
|
|
|
|
rm -rf $(CURDIR)/node_modules/*
|