Skip to content

Commit

Permalink
docs(unstable-load-from-file): show members behind feature-flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornaz committed Jun 6, 2022
1 parent 74559f9 commit 44484db
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .gitpod.yml
Expand Up @@ -2,15 +2,14 @@ image:
file: .gitpod.Dockerfile

tasks:
- name: doc
init: cargo +nightly doc --all-features --no-deps
- name: serve docs
command: miniserve --index benimator/index.html target/doc

- name: test
init: |
cp .cargo/fast_compiles_config .cargo/config.toml
cargo update
cargo doc --all-features --no-deps
cargo +nightly doc --all-features --no-deps
cargo clippy --all-features --all-targets
cargo test --all-features
cargo test
Expand All @@ -20,7 +19,7 @@ tasks:
-x 'test --all-features --tests' \
-x 'test --all-features' \
-x 'clippy --all-features --all-targets' \
-x 'doc --all-features --no-deps'
-x '+nightly doc --all-features --no-deps'
vscode:
extensions:
Expand All @@ -30,10 +29,10 @@ vscode:
- bungcip.better-toml

ports:
- name: example (wasm)
port: 1334
- name: documentation
port: 8080
visibility: private
onOpen: notify
onOpen: open-browser

github:
prebuilds:
Expand Down
9 changes: 6 additions & 3 deletions Cargo.toml
Expand Up @@ -10,6 +10,9 @@ repository = "https://github.com/jcornaz/benimator"
keywords = ["game", "gamedev", "anmiation", "bevy"]
categories = ["game-development"]

[package.metadata.docs.rs]
all-features = true

[features]
default = []
unstable-load-from-file = ["serde", "serde_yaml", "anyhow", "bevy_utils"]
Expand All @@ -31,13 +34,13 @@ bevy = { version = "0.7.0", default-features = false, features = ["render", "x11
rstest = { version = "0.13.0", default-features = false }
criterion = { version = "0.3.5", default-features = false }

[build-dependencies]
rustc_version = "0.4.0"

[[bench]]
name = "play_component"
harness = false

[[example]]
name = "using_animation_file"
required-features = ["unstable-load-from-file"]

[profile.dev]
debug = 0
7 changes: 7 additions & 0 deletions build.rs
@@ -0,0 +1,7 @@
use rustc_version::{version_meta, Channel};

fn main() {
if let Channel::Nightly = version_meta().unwrap().channel {
println!("cargo:rustc-cfg=nightly");
}
}
1 change: 1 addition & 0 deletions src/lib.rs
Expand Up @@ -6,6 +6,7 @@
clippy::pedantic
)]
#![allow(clippy::needless_pass_by_value, clippy::module_name_repetitions)]
#![cfg_attr(nightly, feature(doc_auto_cfg))]

//! A sprite-sheet animation plugin for [bevy](https://bevyengine.org)
//!
Expand Down

0 comments on commit 44484db

Please sign in to comment.