1 2 3 4 5 6 7 8 9 10 11 12
//! `yog-data-export <file.ts>`: the binary form's constants as TypeScript. fn main() { let Some(path) = std::env::args().nth(1) else { eprintln!("usage: yog-data-export <file.ts>"); std::process::exit(2); }; if let Err(e) = yog_codegen::write_if_changed(path.as_ref(), yog_data::export::typescript()) { eprintln!("{path}: {e}"); std::process::exit(1); } }