-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working but not generating in 'dist'
- Loading branch information
1 parent
61386d5
commit 63b1eb1
Showing
28 changed files
with
656 additions
and
733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
|
||
# Dioxus.toml | ||
|
||
[application] | ||
output = "dist" | ||
serve_dir = "dist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
// build.rs (used to create 'dist' directory) | ||
use std::env; | ||
use std::fs; | ||
use std::path::Path; | ||
|
||
fn main() { | ||
let out_dir = env::var("OUT_DIR").unwrap(); | ||
let target_dir = Path::new(&out_dir).join("../../dist"); | ||
|
||
// Create the dist directory if it doesn't exist | ||
if !target_dir.exists() { | ||
fs::create_dir_all(&target_dir).unwrap(); | ||
} | ||
|
||
println!("cargo:rerun-if-changed=src"); | ||
println!("cargo:rerun-if-changed=Dioxus.toml"); | ||
|
||
println!("Running build.rs..."); | ||
println!("OUT_DIR: {}", out_dir); | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
|
||
<!-- dist/index.html --> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<head> | ||
<title>Eric Machmer</title> | ||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta charset="UTF-8" /> | ||
<link rel="preload" href="/./wasm/github_bio_bg.wasm" as="fetch" type="application/wasm" crossorigin=""> | ||
<link rel="preload" href="/./wasm/github_bio.js" as="script"> | ||
<link rel="stylesheet" href="/assets/styles/tailwind.css"> | ||
</head> | ||
<body> | ||
<div id="main"></div> | ||
<script> | ||
// We can't use a module script here because we need to start the script immediately when streaming | ||
import("/./wasm/github_bio.js").then( | ||
({ default: init }) => { | ||
init("/./wasm/github_bio_bg.wasm").then((wasm) => { | ||
if (wasm.__wbindgen_start == undefined) { | ||
wasm.main(); | ||
} | ||
}); | ||
} | ||
); | ||
</script> | ||
</body> | ||
</html> | ||
|
||
</head> | ||
<body> | ||
<div id="main"></div> | ||
<script type="module"> | ||
import init from "./assets/dioxus/name.js"; | ||
init("./assets/dioxus/name_bg.wasm").then(wasm => { | ||
if (wasm.__wbindgen_start == undefined) { | ||
wasm.main(); | ||
} | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.