chore(example): move demo2 to top level folder (#1524)

This commit is contained in:
Josh McKinney 2024-12-01 02:46:26 -08:00 committed by GitHub
parent 357ae7e251
commit 35eba76b4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 53 additions and 27 deletions

21
Cargo.lock generated
View File

@ -730,6 +730,23 @@ dependencies = [
"ratatui",
]
[[package]]
name = "demo2"
version = "0.0.0"
dependencies = [
"color-eyre",
"crossterm",
"indoc",
"itertools 0.13.0",
"palette",
"rand 0.8.5",
"rand_chacha 0.3.1",
"ratatui",
"strum",
"time",
"unicode-width",
]
[[package]]
name = "deranged"
version = "0.3.11"
@ -1393,9 +1410,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]]
name = "indexmap"
version = "2.6.0"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
dependencies = [
"equivalent",
"hashbrown",

View File

@ -42,3 +42,9 @@ This is the original demo example from the main README. It is available for each
[Source](./apps/demo/).
![Demo](https://github.com/ratatui/ratatui/blob/images/examples/demo.gif?raw=true)
## Demo2
This is the demo example from the main README and crate page. [Source](./apps/demo2/).
![Demo2](https://github.com/ratatui/ratatui/blob/images/examples/demo2.gif?raw=true)

View File

@ -1,15 +1,7 @@
[package]
name = "demo"
publish = false
authors.workspace = true
documentation.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme.workspace = true
license.workspace = true
exclude.workspace = true
edition.workspace = true
rust-version.workspace = true

View File

@ -0,0 +1,19 @@
[package]
name = "demo2"
publish = false
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[dependencies]
color-eyre = "0.6.3"
crossterm.workspace = true
indoc.workspace = true
itertools.workspace = true
palette = "0.7.6"
rand = "0.8.5"
rand_chacha = "0.3.1"
ratatui = { workspace = true, features = ["all-widgets"] }
strum.workspace = true
time = "0.3.36"
unicode-width = "0.2.0"

View File

@ -0,0 +1,9 @@
## Demo2
This is the demo example from the main README and crate page. Source: [demo2](./demo2/).
```shell
cargo run -p demo2
```
![Demo2](https://github.com/ratatui/ratatui/blob/images/examples/demo2.gif?raw=true)

View File

@ -97,7 +97,6 @@ unstable-backend-writer = [
[dependencies]
document-features = { workspace = true, optional = true }
indoc = "2"
instability.workspace = true
itertools.workspace = true
palette = { version = "0.7.6", optional = true }
@ -200,11 +199,6 @@ name = "custom_widget"
required-features = ["crossterm"]
doc-scrape-examples = true
[[example]]
name = "demo2"
required-features = ["crossterm", "palette", "widget-calendar"]
doc-scrape-examples = true
[[example]]
name = "docsrs"
required-features = ["crossterm"]

View File

@ -43,16 +43,6 @@ move some of these design choices into the core of Ratatui to simplify apps.
[How to use color-eyre with Ratatui]: https://ratatui.rs/how-to/develop-apps/color_eyre/
## Demo2
This is the demo example from the main README and crate page. Source: [demo2](./demo2/).
```shell
cargo run --example=demo2 --features="crossterm widget-calendar"
```
![Demo2][demo2.gif]
## Demo
This is the previous demo example from the main README. It is available for each of the backends. Source:
@ -452,7 +442,6 @@ examples/vhs/generate.bash
[constraints.gif]: https://github.com/ratatui/ratatui/blob/images/examples/constraints.gif?raw=true
[custom_widget.gif]: https://github.com/ratatui/ratatui/blob/images/examples/custom_widget.gif?raw=true
[demo.gif]: https://github.com/ratatui/ratatui/blob/images/examples/demo.gif?raw=true
[demo2.gif]: https://github.com/ratatui/ratatui/blob/images/examples/demo2.gif?raw=true
[flex.gif]: https://github.com/ratatui/ratatui/blob/images/examples/flex.gif?raw=true
[gauge.gif]: https://github.com/ratatui/ratatui/blob/images/examples/gauge.gif?raw=true
[hello_world.gif]: https://github.com/ratatui/ratatui/blob/images/examples/hello_world.gif?raw=true