//! Builds web/index.html and web/login.html from their TypeScript (web/build.mjs) into OUT_DIR, //! where src/web.rs include_str!s them. Needs node and `npm ci` run first. use std::process::Command; fn main() { println!("cargo:rerun-if-changed=web"); println!("cargo:rerun-if-changed=package-lock.json"); let out = std::env::var("OUT_DIR").unwrap(); let status = Command::new("node") .args(["web/build.mjs", &out]) .status() .expect("building the web pages needs node on PATH (and `npm ci` run once)"); assert!(status.success(), "web/build.mjs failed; run `node web/build.mjs` to see why"); }