PROJECT_DIR := absolute_path(".")

set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

_default:
    @just --list

[windows]
docs: _fmt
    @$env:RUSTDOCFLAGS=""
    @cargo doc
    @$env:RUSTDOCFLAGS="--html-in-header {{justfile_directory()}}\katex-header.html"
    @cargo doc --no-deps --open

[linux]
docs: _fmt
    @RUSTDOCFLAGS="" cargo doc
    @RUSTDOCFLAGS="--html-in-header {{justfile_directory()}}/katex-header.html" cargo doc --no-deps --open

test: _fmt
    cargo test

_fmt:
    @cargo fmt
