2023-03-12 00:54:16 -05:00
|
|
|
# Rust test needs to be built after because the web crate depends on js-build
|
|
|
|
build: fmt js-build rust-build rust-test
|
2023-02-28 09:36:36 -05:00
|
|
|
|
2023-03-01 07:28:33 -05:00
|
|
|
rust-test:
|
2023-02-28 11:53:39 -05:00
|
|
|
cargo test --all
|
|
|
|
cargo fmt --all --check
|
|
|
|
|
2023-03-12 00:54:16 -05:00
|
|
|
rust-build: output-clean js-build
|
2023-02-28 05:58:43 -05:00
|
|
|
cargo build --all
|
2023-03-11 18:40:29 -05:00
|
|
|
cargo build -p web --release --target x86_64-unknown-linux-musl
|
|
|
|
earthly +rust-image
|
2023-02-28 05:58:43 -05:00
|
|
|
|
2023-03-06 22:57:07 -05:00
|
|
|
wasm-build:
|
2023-03-02 18:55:40 -05:00
|
|
|
wasm-pack build --target web xpin-wasm
|
2023-02-28 05:58:43 -05:00
|
|
|
|
2023-03-06 22:57:07 -05:00
|
|
|
wordlist-build:
|
|
|
|
. wordlist/venv/bin/activate && cd wordlist && for i in *.py; do "./${i}"; done
|
|
|
|
|
|
|
|
js-build: wasm-build docs-build
|
|
|
|
# mkdir -p ./web-frontend/static/docs/
|
|
|
|
# rsync -ha ./build/docs/ ./web-frontend/static/docs/
|
2023-02-28 05:58:43 -05:00
|
|
|
yarn --cwd ./web-frontend/ build
|
2023-03-12 00:54:16 -05:00
|
|
|
rsync -ha ./web-frontend/build/ ./build/
|
2023-02-28 05:58:43 -05:00
|
|
|
|
2023-03-11 18:40:29 -05:00
|
|
|
output-clean:
|
2023-02-28 11:57:58 -05:00
|
|
|
rm -vrf build
|
2023-03-12 00:54:16 -05:00
|
|
|
mkdir build
|
2023-02-28 09:36:36 -05:00
|
|
|
|
2023-03-12 00:54:16 -05:00
|
|
|
docs-build: output-clean
|
2023-02-28 09:36:36 -05:00
|
|
|
earthly +docs
|
2023-03-05 00:03:43 -05:00
|
|
|
cargo doc --all
|
2023-02-28 09:36:36 -05:00
|
|
|
|
2023-02-28 05:58:43 -05:00
|
|
|
# TODO: Clippy
|
2023-03-01 07:28:33 -05:00
|
|
|
rust-watch:
|
2023-02-28 05:58:43 -05:00
|
|
|
cargo watch -x fmt -x check -x build
|
|
|
|
|
2023-03-01 07:28:33 -05:00
|
|
|
js-dev:
|
2023-02-28 05:58:43 -05:00
|
|
|
yarn --cwd ./web-frontend/ dev
|
|
|
|
|
|
|
|
fmt:
|
2023-02-28 09:36:36 -05:00
|
|
|
# just --fmt --unstable
|
2023-02-28 11:53:39 -05:00
|
|
|
cargo fmt --all
|
2023-02-28 05:58:43 -05:00
|
|
|
yarn --cwd ./web-frontend/ format
|
|
|
|
|
2023-02-28 11:53:39 -05:00
|
|
|
serve:
|
|
|
|
http-server --verbose ./web-frontend/build/
|
|
|
|
|
2023-03-02 01:05:05 -05:00
|
|
|
init:
|
2023-02-28 05:58:43 -05:00
|
|
|
yarn --cwd ./web-frontend/
|
|
|
|
cargo fetch
|
2023-02-28 06:31:42 -05:00
|
|
|
cargo install wasm-pack
|
2023-03-12 00:54:16 -05:00
|
|
|
|
|
|
|
init-python:
|
2023-03-06 22:57:07 -05:00
|
|
|
if [ ! -d "wordlist/venv" ]; then python3 -m virtualenv wordlist/venv -p "$(which python3)"; fi; export OSTYPE=linux-gnu && . wordlist/venv/bin/activate
|
|
|
|
export OSTYPE=linux-gnu && . wordlist/venv/bin/activate && pip install -r wordlist/requirements.txt && python -c 'import nltk; nltk.download('wordnet')'
|