Skip to content

Commit

Permalink
Templates are now copied to dist on build
Browse files Browse the repository at this point in the history
  • Loading branch information
tmahmood committed Jul 25, 2024
1 parent d01c18d commit bc28794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ fn main() {
.status().unwrap().success() {
panic!("Failed to process css")
}
// adding templates
if !Command::new("cp")
.args(["-r", "frontend/templates", "dist/templates"])
.status().unwrap().success() {
panic!("Failed to copy fonts")
}
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::endpoints::tasks::task_query_builder::{TaskQuery, TaskReport};

lazy_static::lazy_static! {
pub static ref TEMPLATES: tera::Tera = {
let mut tera = match tera::Tera::new("frontend/templates/**/*") {
let mut tera = match tera::Tera::new("dist/templates/**/*") {
Ok(t) => t,
Err(e) => {
println!("Parsing error(s): {}", e);
Expand Down

0 comments on commit bc28794

Please sign in to comment.