Updated for v0.2.5 release

master
DavidOConnor 6 years ago
parent a35bcaea8d
commit 1136f6d8aa

@ -10,7 +10,7 @@ crate-type = ["cdylib"]
[dependencies] [dependencies]
seed = "^0.2.4" seed = "^0.2.5"
wasm-bindgen = "^0.2.33" wasm-bindgen = "^0.2.33"
web-sys = "^0.3.6" web-sys = "^0.3.6"

@ -6,9 +6,9 @@
<meta name="description" content=""> <meta name="description" content="">
<link rel="icon" type="image/png" href="./public/favicon.png"> <link rel="icon" type="image/png" href="/public/favicon.png">
<!--<link rel="stylesheet" type="text/css" href="./style.css">--> <!--<link rel="stylesheet" type="text/css" href="/style.css">-->
<title>A Title</title> <title>A Title</title>
@ -16,7 +16,7 @@
<body> <body>
<section id="app"></section> <section id="app"></section>
<script src='./pkg/package.js'></script> <script src='/pkg/package.js'></script>
<script> <script>
// the `wasm_bindgen` global is set to the exports of the Rust module // the `wasm_bindgen` global is set to the exports of the Rust module
@ -27,7 +27,7 @@
} }
// here we tell bindgen the path to the wasm file so it can run // here we tell bindgen the path to the wasm file so it can run
// initialization and return to us a promise when it's done // initialization and return to us a promise when it's done
wasm_bindgen('./pkg/package_bg.wasm') wasm_bindgen('/pkg/package_bg.wasm')
.then(run) .then(run)
.catch(console.error); .catch(console.error);
</script> </script>

@ -13,9 +13,8 @@ class Handler(http.server.SimpleHTTPRequestHandler):
def do_GET(self): def do_GET(self):
urlparts = urllib.parse.urlparse(self.path) urlparts = urllib.parse.urlparse(self.path)
request_file_path = urlparts.path.strip('/') request_file_path = urlparts.path.strip('/')
if not os.path.exists(request_file_path): if not os.path.exists(request_file_path):
self.path = 'index.html' self.path = '/'
return http.server.SimpleHTTPRequestHandler.do_GET(self) return http.server.SimpleHTTPRequestHandler.do_GET(self)

@ -37,7 +37,7 @@ fn update(msg: Msg, model: Model) -> Update<Model> {
fn view(_state: seed::App<Msg, Model>, model: &Model) -> El<Msg> { fn view(_state: seed::App<Msg, Model>, model: &Model) -> El<Msg> {
button![ button![
simple_ev("click", Msg::Increment), simple_ev(Ev::Click, Msg::Increment),
format!("Hello, World × {}", model.val) format!("Hello, World × {}", model.val)
] ]
} }

Loading…
Cancel
Save