2024-05-28 07:28:13 -04:00
|
|
|
use static_files::NpmBuild;
|
|
|
|
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
|
|
if !cfg!(debug_assertions) && cfg!(feature = "embed_frontend") {
|
2024-06-12 04:16:00 -04:00
|
|
|
NpmBuild::new("../frontend")
|
2024-05-28 07:28:13 -04:00
|
|
|
.install()?
|
|
|
|
.run("generate")?
|
2024-06-12 04:16:00 -04:00
|
|
|
.target("../frontend/.output/public")
|
2024-05-28 07:28:13 -04:00
|
|
|
.change_detection()
|
|
|
|
.to_resource_dir()
|
|
|
|
.build()
|
|
|
|
} else {
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|