mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
docs: scrape example code from examples/* (#195)
see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
This commit is contained in:
parent
e08b466166
commit
49e0f4e983
1 changed files with 24 additions and 0 deletions
24
Cargo.toml
24
Cargo.toml
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue