diff --git a/README.md b/README.md index 65f5bb7..cb6420d 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Then add it to your app like so: ```rust use bevy::prelude::*; -use bevy_proto::plugin::ProtoPlugin; +use bevy_proto::ProtoPlugin; fn main() { App::new() diff --git a/src/data.rs b/src/data.rs index 3368e56..392cbf5 100644 --- a/src/data.rs +++ b/src/data.rs @@ -13,7 +13,7 @@ use dyn_clone::DynClone; use indexmap::IndexSet; use serde::{Deserialize, Serialize}; -use crate::prelude::DefaultProtoDeserializer; +use crate::plugin::DefaultProtoDeserializer; use crate::{components::ProtoComponent, prototype::Prototypical, utils::handle_cycle}; /// A String newtype for a handle's asset path @@ -440,7 +440,7 @@ pub trait ProtoDeserializer: DynClone { /// /// ``` /// // The default implementation: - /// use bevy_proto::prototype::{Prototype, Prototypical}; + /// use bevy_proto::{Prototype, Prototypical}; /// fn example_deserialize(data: &str) -> Option> { /// if let Ok(value) = serde_yaml::from_str::(data) { /// Some(Box::new(value)) diff --git a/src/lib.rs b/src/lib.rs index 2aa7964..59adac6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,19 +74,24 @@ //! extern crate bevy_proto_derive; -pub mod components; +mod components; +pub use bevy_proto_derive::ProtoComponent; +pub use components::ProtoComponent; +mod plugin; +pub use plugin::ProtoPlugin; +mod prototype; +pub use prototype::{deserialize_templates_list, Prototype, Prototypical}; + pub mod data; -pub mod plugin; -pub mod prototype; #[macro_use] mod utils; pub mod prelude { //! Includes all public types and the macro to derive [`ProtoComponent`](super::components::ProtoComponent). - pub use super::components::*; + pub use super::components::ProtoComponent; pub use super::data::*; - pub use super::plugin::*; + pub use super::plugin::ProtoPlugin; pub use super::prototype::{Prototype, Prototypical}; pub use bevy_proto_derive::*; } diff --git a/src/plugin.rs b/src/plugin.rs index 29325db..2b876d1 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -24,7 +24,7 @@ impl ProtoPlugin { /// # Examples /// /// ``` - /// use bevy_proto::plugin::ProtoPlugin; + /// use bevy_proto::ProtoPlugin; /// /// let plugin = ProtoPlugin::with_dir("assets/config"); /// ``` @@ -49,7 +49,7 @@ impl ProtoPlugin { /// # Examples /// /// ``` - /// use bevy_proto::plugin::ProtoPlugin; + /// use bevy_proto::ProtoPlugin; /// /// let plugin = ProtoPlugin::with_dir_recursive("assets/config"); /// ``` @@ -73,7 +73,7 @@ impl ProtoPlugin { /// # Examples /// /// ``` - /// use bevy_proto::plugin::ProtoPlugin; + /// use bevy_proto::ProtoPlugin; /// /// let plugin = ProtoPlugin::with_dirs(vec![ /// String::from("assets/config"), @@ -100,7 +100,7 @@ impl ProtoPlugin { /// # Examples /// /// ``` - /// use bevy_proto::plugin::ProtoPlugin; + /// use bevy_proto::ProtoPlugin; /// /// let plugin = ProtoPlugin::with_dirs(vec![ /// String::from("assets/config"),