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".
33 lines
844 B
Rust
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();
|
|
}
|