Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export some types directly #15

Merged
merged 3 commits into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_proto"
version = "0.3.0"
version = "0.3.1"
B-Reif marked this conversation as resolved.
Show resolved Hide resolved
edition = "2021"
authors = ["Gino Valente <gino.valente.code@gmail.com>"]
description = "Create config files for entities in Bevy"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Box<dyn Prototypical>> {
/// if let Ok(value) = serde_yaml::from_str::<Prototype>(data) {
/// Some(Box::new(value))
Expand Down
14 changes: 9 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,23 @@
//!
extern crate bevy_proto_derive;

pub mod components;
mod components;
pub use components::ProtoComponent;
B-Reif marked this conversation as resolved.
Show resolved Hide resolved
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::*;
}
Expand Down
8 changes: 4 additions & 4 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl ProtoPlugin {
/// # Examples
///
/// ```
/// use bevy_proto::plugin::ProtoPlugin;
/// use bevy_proto::ProtoPlugin;
///
/// let plugin = ProtoPlugin::with_dir("assets/config");
/// ```
Expand All @@ -49,7 +49,7 @@ impl ProtoPlugin {
/// # Examples
///
/// ```
/// use bevy_proto::plugin::ProtoPlugin;
/// use bevy_proto::ProtoPlugin;
///
/// let plugin = ProtoPlugin::with_dir_recursive("assets/config");
/// ```
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down