blob: 05eca7ae48097319ff1cf0afd239720b9f424851 (
plain) (
tree)
|
|
use std::env;
fn main() {
println!("cargo:rerun-if-changed=migrations");
let out_dir = env::var("OUT_DIR").unwrap();
println!("cargo:rerun-if-changed=companion-lite/");
let companion_out = std::path::Path::new(&out_dir).join("companion");
if let Ok(exit) = std::process::Command::new("tsc")
.arg("--outDir")
.arg(companion_out.as_os_str())
.current_dir("companion-lite")
.spawn()
.unwrap()
.wait()
{
if !exit.success() {
std::process::exit(exit.code().unwrap_or(1))
}
}
let companion_in = std::path::Path::new("companion-lite");
for file in ["index.html", "style.css"] {
std::fs::copy(
companion_in.join(file),
&companion_out.join(file)
).unwrap();
}
}
|