dioxus/packages/interpreter/build.rs
2022-02-01 16:07:50 -05:00

16 lines
462 B
Rust

use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=interpreter.ts");
match Command::new("tsc").spawn() {
Ok(_) => println!("Was spawned :)"),
Err(e) => {
if let std::io::ErrorKind::NotFound = e.kind() {
println!("`tsc` was not found! Not going to generate new interpreter")
} else {
println!("Some strange error occurred :(");
}
}
}
}