docs: scrape example code from examples/* (#195)

see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
This commit is contained in:
Josh McKinney 2023-05-24 12:58:04 -07:00 committed by GitHub
parent e08b466166
commit 49e0f4e983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,8 @@ macros = []
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
# see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[dependencies] [dependencies]
bitflags = "1.3" bitflags = "1.3"
@ -45,67 +47,89 @@ indoc = "2.0"
[[example]] [[example]]
name = "barchart" name = "barchart"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "block" name = "block"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "canvas" name = "canvas"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "calendar" name = "calendar"
required-features = ["crossterm", "widget-calendar"] required-features = ["crossterm", "widget-calendar"]
doc-scrape-examples = true
[[example]] [[example]]
name = "chart" name = "chart"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "custom_widget" name = "custom_widget"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]]
name = "demo"
# this runs for all of the terminal backends, so it can't be built using --all-features or scraped
doc-scrape-examples = false
[[example]] [[example]]
name = "gauge" name = "gauge"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "layout" name = "layout"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "list" name = "list"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "panic" name = "panic"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "paragraph" name = "paragraph"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "popup" name = "popup"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "sparkline" name = "sparkline"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "table" name = "table"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "tabs" name = "tabs"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "user_input" name = "user_input"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true
[[example]] [[example]]
name = "inline" name = "inline"
required-features = ["crossterm"] required-features = ["crossterm"]
doc-scrape-examples = true