[alias]
####################################################################################################
# core crates:
# * moxie
# * topo
# * topo-macro

core-flow = """
watch --clear
    -x fmt
    -x clippy-core
    -x check-core
    -x test-core
    -x docs-clean
    -x docs-all
"""

bench-core = "bench --all-targets --all-features --package illicit --package moxie --package topo"
check-core = "check --all-targets --all-features --package illicit --package moxie --package topo"
clippy-core = "clippy --all-features --package illicit --package moxie --package topo --package topo-macro"
test-core = "test --all-targets --all-features --package illicit --package moxie --package topo --package topo-macro"

docs-all = "doc --workspace --no-deps"
docs-clean = "clean --doc"

####################################################################################################
# dom crates and examples

dom-flow = """
watch --clear
    -x clippy-dom
    -x test-ssr-example
    -x test-dom-lib
    -x test-dom-drivertest
    -x check-dom-hacking
    -x check-dom-todo
    -x build-dom-hacking
    -x build-dom-todo
"""

check-dom-lib = "check --package moxie-dom"
check-dom-hacking = "check --package dom-hacking"
check-dom-todo = "check --package todomvc-moxie"

wa-pack = "run --manifest-path dom/local-wasm-pack/Cargo.toml --"
wa-pack-build = "wa-pack build --target web --out-name index"

build-dom-lib = "wa-pack-build dom"
build-dom-hacking = "wa-pack-build dom/examples/hacking"
build-dom-todo = "wa-pack-build dom/examples/todo"

test-dom-lib = "test --package moxie-dom --all-targets"
test-dom-drivertest = "wa-pack test --firefox --headless dom/examples/drivertest"
test-ssr-example = "test --package ssr-poc --all-targets"

# dom utilities
clippy-dom = """clippy
    --all-targets
    --package moxie-dom
    --package dom-hacking
    --package todomvc-moxie
"""

####################################################################################################
# website

site-flow = "watch --clear -x build-website"
build-website = "ofl website build target/website"

####################################################################################################
# ofl

ofl = "run --manifest-path ofl/Cargo.toml --"
server = "watch -w ofl/ -x ofl"

ofl-flow = """
watch --clear -w ofl
    -x fmt-ofl
    -x clippy-ofl
    -x check-ofl
    -x test-ofl
    -x docs-ofl
"""

check-ofl = "check --manifest-path ofl/Cargo.toml --workspace"
clippy-ofl = "clippy --manifest-path ofl/Cargo.toml --workspace"
fmt-ofl = "fmt -- ofl/src/main.rs"
test-ofl = "test --manifest-path ofl/Cargo.toml --workspace"
docs-ofl = "doc --manifest-path ofl/Cargo.toml --workspace --no-deps"
