Skip to content

Commit

Permalink
Merge pull request #11 from spielrs/development
Browse files Browse the repository at this point in the history
Add build file
  • Loading branch information
dancespiele authored Mar 17, 2020
2 parents 0ea9df3 + e4c1891 commit c0360fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions crate/yew_styles/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub fn main() {
let using_web_sys = cfg!(feature = "web_sys");
let using_std_web = cfg!(feature = "std_web");
if using_web_sys && using_std_web {
panic!("Yew does not allow the `web_sys` and `std_web` cargo features to be used simultaneously");
} else if !using_web_sys && !using_std_web {
panic!("Yew requires selecting either the `web_sys` or `std_web` cargo feature");
}
}
1 change: 1 addition & 0 deletions crate/yew_styles/src/assets.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(any(feature = "std_web", feature = "web_sys"))]
use yew::prelude::*;

#[derive(Clone)]
Expand Down
4 changes: 0 additions & 4 deletions crate/yew_styles/src/components/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
extern crate uuid;
#[cfg(feature = "std_web")]
extern crate yew;
#[cfg(feature = "web_sys")]
extern crate yew;
pub mod button;
pub mod container;
pub mod item;
Expand Down

0 comments on commit c0360fa

Please sign in to comment.