This commit is contained in:
parent
3837302161
commit
439467f730
10 changed files with 45 additions and 32 deletions
4
build.rs
4
build.rs
|
@ -5,7 +5,7 @@ fn main() {
|
|||
let url = "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js";
|
||||
let dest_path = Path::new("src/htmx.min.js");
|
||||
|
||||
println!("Downloading htmx.min.js from {}", url);
|
||||
println!("Downloading htmx.min.js from {url}");
|
||||
let response = reqwest::blocking::get(url)
|
||||
.expect("Failed to send HTTP request")
|
||||
.error_for_status()
|
||||
|
@ -13,7 +13,7 @@ fn main() {
|
|||
|
||||
let content = response.bytes().expect("Failed to read response body");
|
||||
|
||||
fs::write(&dest_path, &content).expect("Failed to write htmx.min.js to destination");
|
||||
fs::write(dest_path, &content).expect("Failed to write htmx.min.js to destination");
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue