use static_files::{resource_dir, NpmBuild}; use std::{fs::{self, copy}, path::Path}; fn main() -> std::io::Result<()> { NpmBuild::new("./static_packages") .change_detection() .install()?; if fs::metadata(Path::new("./static_packages/dist")).is_err() { fs::create_dir(Path::new("./static_packages/dist"))?; } copy(Path::new("./static_packages/node_modules/feather-icons/dist/feather-sprite.svg"), Path::new("./static_packages/dist/feather-sprite.svg"))?; copy(Path::new("./static_packages/node_modules/bulma/css/bulma.min.css"), Path::new("./static_packages/dist/bulma.min.css"))?; copy(Path::new("./static_packages/node_modules/htmx.org/dist/htmx.min.js"), Path::new("./static_packages/dist/htmx.min.js"))?; copy(Path::new("./static_packages/node_modules/htmx.org/dist/ext/response-targets.js"), Path::new("./static_packages/dist/response-targets.js"))?; copy(Path::new("./static_packages/brass.jpeg"), Path::new("./static_packages/dist/brass.jpeg"))?; resource_dir("./static_packages/dist").build() }