pagetop/build.rs
Manuel Cillero eddb397bc7 Actualiza la estructura de los recursos estáticos
Se prepara PageTop para permitir en el futuro compilar los fuentes
incluyendo los recursos estáticos dentro del ejecutable (tal y como está
ahora), o usando una carpeta externa "static".
2022-02-22 20:45:18 +01:00

33 lines
844 B
Rust

use actix_web_static_files::resource_dir;
use std::env;
use std::path::Path;
fn main() {
resource_dir("./static/theme")
.with_generated_filename(
Path::new(env::var("OUT_DIR").unwrap().as_str())
.join("theme.rs")
)
.with_generated_fn("assets")
.build()
.unwrap();
resource_dir("./static/aliner")
.with_generated_filename(
Path::new(env::var("OUT_DIR").unwrap().as_str())
.join("aliner.rs")
)
.with_generated_fn("assets")
.build()
.unwrap();
resource_dir("./static/bootsier")
.with_generated_filename(
Path::new(env::var("OUT_DIR").unwrap().as_str())
.join("bootsier.rs")
)
.with_generated_fn("assets")
.build()
.unwrap();
}