feat: commit code
This commit is contained in:
1 parent
dfcf4e1f88
commit
c97d7f263a
3 files changed
+4
-4
No files matched your search
@@ -17,7 +17,7 @@ asset_dir = "public"
|
|||||||
[web.app]
|
[web.app]
|
||||||
|
|
||||||
# HTML title tag content
|
# HTML title tag content
|
||||||
title = "dioxus | ⛺"
|
title = "Dioxus | An elegant GUI library for Rust"
|
||||||
|
|
||||||
index_on_404 = true
|
index_on_404 = true
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,9 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main"></div>
|
<div id="main"></div>
|
||||||
<!-- Note the usage of `type=module` here as this is an ES6 module -->
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import init from "{base_path}/assets/dioxus/{app_name}.js";
|
import init from "/{base_path}/assets/dioxus/{app_name}.js";
|
||||||
init("{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
|
init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
|
||||||
if (wasm.__wbindgen_start == undefined) {
|
if (wasm.__wbindgen_start == undefined) {
|
||||||
wasm.main();
|
wasm.main();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ impl Create {
|
|||||||
let mut meta_file = String::new();
|
let mut meta_file = String::new();
|
||||||
dioxus_file.read_to_string(&mut meta_file)?;
|
dioxus_file.read_to_string(&mut meta_file)?;
|
||||||
meta_file = meta_file.replace("{{project-name}}", &self.name);
|
meta_file = meta_file.replace("{{project-name}}", &self.name);
|
||||||
|
meta_file = meta_file.replace("{{default-platform}}", "web");
|
||||||
File::create(project_path.join("Dioxus.toml"))?.write_all(meta_file.as_bytes())?;
|
File::create(project_path.join("Dioxus.toml"))?.write_all(meta_file.as_bytes())?;
|
||||||
|
|
||||||
println!();
|
println!();
|
||||||
|
|||||||
Reference in new issue
Block a user