this_algorithm/justfile
2023-03-05 00:03:43 -05:00

46 lines
791 B
Makefile

build: fmt rust-build build-wasm js-build
all: clean fmt build build-docs # rust-test
rsync -ha ./web-frontend/build/ build/
du -shc build/* | sort -h
rust-test:
cargo test --all
cargo fmt --all --check
rust-build:
cargo build --all
build-wasm:
wasm-pack build --target web xpin-wasm
js-build: build-wasm
yarn --cwd ./web-frontend/ build
clean:
rm -vrf build
build-docs:
earthly +docs
cargo doc --all
# TODO: Clippy
rust-watch:
cargo watch -x fmt -x check -x build
js-dev:
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:
yarn --cwd ./web-frontend/
cargo fetch
cargo install wasm-pack