Makefile 470 Bytes
.PHONY: start wasm build run clean

PROFILE ?= dev
ifeq "$(PROFILE)" "release"
PROFILE = --release
else
PROFILE =
endif

start:
	systemfd --no-pid -s 0.0.0.0:3000 -- \
		cargo watch -i static/ -s "make run"

wasm:
	wasm-pack build $(PROFILE) -d ../static/ui -t web ./ui

build:
	cargo build $(PROFILE) --bin artshop-server

run: build wasm
	cargo run --bin artshop-server

release:
	docker build -t artshop -f build/Dockerfile .

clean:
	cargo clean
	rm -Rf ./static/ui