2024-03-06 16:03:10 +00:00
|
|
|
use std::{
|
|
|
|
fs::{create_dir_all, File},
|
|
|
|
io::Result,
|
2024-03-08 13:29:29 +00:00
|
|
|
path::Path,
|
2024-03-06 16:03:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// Create placeholders for wasm files so that `cargo check` etc work without explicitly building
|
|
|
|
/// frontend.
|
|
|
|
fn main() -> Result<()> {
|
|
|
|
create_dir_all("assets/dist/")?;
|
2024-03-08 13:29:29 +00:00
|
|
|
let js = "assets/dist/ibis.js";
|
|
|
|
if !Path::new(js).exists() {
|
|
|
|
File::create(js)?;
|
|
|
|
}
|
|
|
|
let wasm = "assets/dist/ibis_bg.wasm";
|
|
|
|
if !Path::new(wasm).exists() {
|
|
|
|
File::create(wasm)?;
|
|
|
|
}
|
2024-03-06 16:03:10 +00:00
|
|
|
Ok(())
|
|
|
|
}
|