mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
Prepare for upload
This commit is contained in:
parent
73902ea40d
commit
672b9eb75f
3 changed files with 10 additions and 5 deletions
|
@ -9,6 +9,10 @@ edition = "2018"
|
|||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
dev = []
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "^0.2"
|
||||
yew = { git = "https://github.com/yewstack/yew.git", rev = "1507c21b" }
|
||||
|
|
2
dev.sh
2
dev.sh
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec cargo watch -s './build.sh --dev && simple-http-server -i --nocache --cors' -w src
|
||||
exec cargo watch -s './build.sh --dev -- --features dev && simple-http-server -i --nocache --cors' -w src
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#![recursion_limit = "512"]
|
||||
|
||||
#[cfg(feature = "dev")]
|
||||
mod app;
|
||||
pub mod buttons;
|
||||
pub mod collapse;
|
||||
|
@ -7,8 +8,7 @@ pub mod forms;
|
|||
pub mod icon;
|
||||
pub mod tree;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[cfg(feature = "dev")]
|
||||
#[macro_export]
|
||||
macro_rules! log {
|
||||
($s:expr $(,$args:expr)*) => {{
|
||||
|
@ -16,8 +16,9 @@ macro_rules! log {
|
|||
}};
|
||||
}
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn run_app() -> Result<(), JsValue> {
|
||||
#[cfg(feature = "dev")]
|
||||
#[wasm_bindgen::prelude::wasm_bindgen(start)]
|
||||
pub fn run_app() -> Result<(), wasm_bindgen::JsValue> {
|
||||
yew::start_app::<app::App>();
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue