prod build includes resources

main
Ashelyn Dawn 1 year ago
parent 0e04ed4373
commit b57c05a8f2

7
Cargo.lock generated

@ -10,6 +10,7 @@ dependencies = [
"clap",
"console_error_panic_hook",
"flate2",
"fs_extra",
"futures",
"serde",
"serde_json",
@ -273,6 +274,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures"
version = "0.3.26"

@ -16,3 +16,4 @@ tar = "0.4.38"
yew = { version = "0.20.0", features = ["ssr", "csr"] }
console_error_panic_hook = { version ="0.1" }
wasm-bindgen = {version = "0.2" }
fs_extra = "1.3.0"

@ -1,6 +1,7 @@
use chrono::{DateTime, NaiveDateTime};
use clap::Parser;
use flate2::read::GzDecoder;
use fs_extra::copy_items;
use serde_json;
use std::{fs, fs::File, io::Read, path::Path, str::FromStr};
use tar::Archive;
@ -62,6 +63,12 @@ fn generate() -> Result<(), Ærror> {
let output_str = render_ssr(outbox, author, archive_time)?;
println!("{}", output_str);
copy_items(
&mut vec!["resources/"],
"out",
&fs_extra::dir::CopyOptions::new(),
);
}
Ok(())

Loading…
Cancel
Save