this_algorithm/justfile
2023-03-02 18:55:40 -05:00

45 lines
771 B
Makefile

build: fmt rust-build build-wasm js-build
all: clean fmt rust-test build # build-docs
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
# 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