this_algorithm/justfile
2023-02-28 11:57:58 -05:00

45 lines
791 B
Makefile

build: fmt build-rust build-wasm build-js
all: clean fmt test-rust build # build-docs
rsync -ha ./web-frontend/build/ build/
du -shc build/* | sort -h
test-rust:
cargo test --all
cargo fmt --all --check
build-rust:
cargo build --all
build-wasm:
wasm-pack build --target web this_algorithm-wasm
build-js: build-wasm
yarn --cwd ./web-frontend/ build
clean:
rm -vrf build
build-docs:
earthly +docs
# TODO: Clippy
watch-rust:
cargo watch -x fmt -x check -x build
watch-js:
yarn --cwd ./web-frontend/ dev
fmt:
# just --fmt --unstable
cargo fmt --all
yarn --cwd ./web-frontend/ format
serve:
http-server --verbose ./web-frontend/build/
init-verbose:
yarn --cwd ./web-frontend/
cargo fetch
cargo install wasm-pack