From b1daeccab04e764f2202f35ccc33a7402ef1ff86 Mon Sep 17 00:00:00 2001 From: Zrzka Date: Thu, 5 Sep 2019 16:14:33 +0200 Subject: [PATCH] Examples cleanup (#196) --- Cargo.toml | 4 ++++ examples/README.md | 10 ++++++---- examples/{program_examples => }/command_bar.rs | 3 ++- examples/program_examples/README.md | 9 --------- 4 files changed, 12 insertions(+), 14 deletions(-) rename examples/{program_examples => }/command_bar.rs (94%) diff --git a/Cargo.toml b/Cargo.toml index fd00584..f3f03bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,10 @@ members = [ "crossterm_screen" ] +exclude = [ + "examples/program_examples" +] + [dependencies] crossterm_screen = { optional = true, path = "./crossterm_screen", version = "0.2.4" } crossterm_cursor = { optional = true, path = "./crossterm_cursor", version = "0.2.5" } diff --git a/examples/README.md b/examples/README.md index b6c65da..d8da784 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,10 +3,12 @@ This folder contains examples for version 0.3.0 Here you will find examples of a - `color`: this is about the styling of the terminal - `cursor`: this is about the actions you can perform with the cursor - `terminal`: this is about the actions you can perform on the terminal -- `input`: this is about input reading. +- `input`: this is about input reading - `key_events`: this is about reading key events - `crossterm`: this is about the struct `Crossterm` - `alternate_screen`: this is about switching to an alternate screen buffer -- `raw_screen`; this is about enabling raw screen -- `command`: this is about to the command api. -- `program examples`:this folder will contain some real life examples \ No newline at end of file +- `raw_screen`: this is about enabling raw screen +- `command`: this is about to the command api +- `program examples`: this folder will contain some real life examples +- `command_bar`: this is a terminal application where multiple threads write to the output while you can enter + commands asynchronously diff --git a/examples/program_examples/command_bar.rs b/examples/command_bar.rs similarity index 94% rename from examples/program_examples/command_bar.rs rename to examples/command_bar.rs index e3b9bb7..1286159 100644 --- a/examples/program_examples/command_bar.rs +++ b/examples/command_bar.rs @@ -1,7 +1,8 @@ extern crate crossterm; use crossterm::{ - input, cursor, terminal, ClearType, Crossterm, InputEvent, KeyEvent, AlternateScreen, RawScreen, Terminal, TerminalCursor + cursor, input, terminal, AlternateScreen, ClearType, Crossterm, InputEvent, KeyEvent, + RawScreen, Terminal, TerminalCursor, }; use std::sync::{Arc, Mutex}; diff --git a/examples/program_examples/README.md b/examples/program_examples/README.md index 5b8a414..710f199 100644 --- a/examples/program_examples/README.md +++ b/examples/program_examples/README.md @@ -13,12 +13,3 @@ The programs are: This is a snake game implemented with this library. To run this use `cargo run` in the directory of snake. -- Command Bar: - - This is a terminal application where multiple threads write to the output while you can enter commands asynchronously. - To run this use `cargo run --example command_bar` - -- Logging: - - This is an async logging program to demonstrate asynchronous logging with a queue. - To run this use `cargo run --example logging`