mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 09:53:33 -04:00
improved code in general
This commit is contained in:
16
build.rs
Normal file
16
build.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=web/dist");
|
||||
|
||||
if env::var_os("CARGO_FEATURE_EMBED_WEB").is_none() {
|
||||
return;
|
||||
}
|
||||
|
||||
let dist_dir = Path::new("web/dist");
|
||||
if let Err(err) = fs::create_dir_all(dist_dir) {
|
||||
panic!("failed to create web/dist for embed-web feature: {err}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user