elnafo/crates/elnafo-frontend/build.rs

21 lines
491 B
Rust
Raw Permalink Normal View History

2024-03-20 12:29:55 +05:00
use ignore::Walk;
use npm_rs::*;
fn main() {
2024-03-20 12:29:55 +05:00
for entry in Walk::new(".")
.filter_map(Result::ok)
.filter(|e| !e.path().is_dir())
.filter(|e| e.file_name() != "package-lock.json")
{
println!("cargo:rerun-if-changed={}", entry.path().display());
}
2024-03-15 19:21:13 +05:00
NpmEnv::default()
.with_node_env(&NodeEnv::from_cargo_profile().unwrap_or_default())
.init_env()
.install(None)
.run("build")
.exec()
.unwrap();
}