diff --git a/sinople-theme/mise.toml b/sinople-theme/mise.toml new file mode 100644 index 0000000..55bb218 --- /dev/null +++ b/sinople-theme/mise.toml @@ -0,0 +1,71 @@ +# mise.toml — toolchain for wordpress-tools / sinople-theme +# Replaces .tool-versions (asdf). mise reads both, so delete the old file. + +# Require a recent mise so backend behaviour matches this file. +min_version = "2025.1.0" + +[settings] +# Needed for cargo:/npm:/ubi: backends on older mise releases; harmless on current ones. +experimental = true + +[tools] +# ── Runtimes ───────────────────────────────────────────────── +bun = "1.2" # replaces deno +node = "22" # LTS — keep for toolchain compat; drop if nothing ends up needing it +rust = "stable" # WASM semantic processor +php = "8.4" # theme target; 8.3 is the floor, CI also tests 8.5 + # NOTE: mise builds PHP from source — needs libxml2/openssl/sqlite + # dev headers. If that's painful, use system PHP or ddev locally + # and keep this pin for CI only. + +# ── Repo tooling ───────────────────────────────────────────── +just = "latest" # repo has a Justfile +trufflehog = "latest" # standardised secret scanning (already in your CI) +actionlint = "latest" # GitHub Actions linting +shellcheck = "latest" # build.sh / dev.sh +taplo = "latest" # TOML formatting, including this file + +# ── WASM toolchain ─────────────────────────────────────────── +# wasm-pack is unmaintained; wasm-bindgen-cli + wasm-opt is the current path. +# Verify names against your mise version with: mise registry +"cargo:wasm-bindgen-cli" = "0.2" +"cargo:cargo-audit" = "latest" +"cargo:cargo-deny" = "latest" +# wasm-opt: install binaryen via your OS package manager, or try: +# "npm:binaryen" = "latest" # confirm it exposes the wasm-opt bin on your platform + +# ── affinescript ───────────────────────────────────────────── +# TODO: pick the one line matching how affinescript is actually distributed, +# then delete the rest: +# "npm:affinescript" = "latest" # if published to npm +# "ubi:hyperpolymath/affinescript" = "latest" # if GitHub release binaries +# "aqua:hyperpolymath/affinescript" = "latest" # if added to the aqua registry +# If it's built from this repo (e.g. cli/), leave it out of [tools] entirely +# and let the setup task + [env] path below handle it. + +[env] +WASM_TARGET = "wasm32-unknown-unknown" +# Prepend in-repo tooling (e.g. a locally built affinescript) to PATH: +_.path = ["./cli/bin"] + +[tasks.setup] +description = "One-time: rust WASM target + JS deps" +run = """ +rustup target add $WASM_TARGET 2>/dev/null || echo 'rustup not found — add the wasm32 target via your rust install' +bun install +""" + +[tasks.build] +description = "Build everything" +run = "./build.sh" + +[tasks.dev] +description = "Watch mode" +run = "./dev.sh" + +[tasks.test] +description = "All suites (deno test → bun test migration)" +run = """ +cargo test --manifest-path wasm/semantic_processor/Cargo.toml +bun test +"""