publish: generate our bindings.rs file from an inlinejs snippet

This commit is contained in:
Jonathan Kelley committed 2022-02-01 15:54:32 -05:00
1 parent 5b69f9b686
commit 71656adc89
3 files changed
+579 -6

No files matched your search

+10 -1
View File
@@ -2,5 +2,14 @@ use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=interpreter.ts");
Command::new("tsc").spawn().unwrap();
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 :(");
}
}
}
}