From 693aeb50c53b4ff2d77147f071934d9313f7c6dc Mon Sep 17 00:00:00 2001 From: Jan Allersma Date: Feb 08 2019 17:49:11 +0000 Subject: Implement a fat log as feature for white backgrounds. Add deprecation list. The new feature is enabled by default on OS X when using ambassade. --- diff --git a/.gitignore b/.gitignore index 852d940..53eaa21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ /target **/*.rs.bk -ambassade.json -dep diff --git a/Cargo.toml b/Cargo.toml index 194d9b2..1b9e1ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,7 @@ rustyline = "2.1.0" git2 = "0.8" ambassade-debug = "^0" termcolor = "1.0" + +[features] +default = [] +bold_log = [] diff --git a/ambassade.json b/ambassade.json new file mode 100644 index 0000000..a8f8c7b --- /dev/null +++ b/ambassade.json @@ -0,0 +1,12 @@ +{ + "build": { + "linux": "cargo build", + "os-x": "cargo build --features bold_log", + "windows": "cargo build" + }, + "run": { + "linux": "cargo run", + "os-x": "cargo run --features bold_log", + "windows": "cargo run" + } +} diff --git a/doc/deprecation_list.md b/doc/deprecation_list.md new file mode 100644 index 0000000..4726819 --- /dev/null +++ b/doc/deprecation_list.md @@ -0,0 +1,5 @@ +# Deprecation list + +## Things that will deprecate in v1.10 + +- Flags. `--help` and `-h` will be deprecated. diff --git a/src/backend/output.rs b/src/backend/output.rs index 84e04ad..79f24d1 100644 --- a/src/backend/output.rs +++ b/src/backend/output.rs @@ -16,7 +16,7 @@ pub fn normal(s: T) where T: Display + Sized { println!("{}", &s); } -#[cfg(target_os="macos")] +#[cfg(feature="bold_log")] pub fn log(s: T) where T: Display + Sized { let string = Box::new(&s); let mut stdout = StandardStream::stdout(ColorChoice::Always); @@ -24,7 +24,7 @@ pub fn log(s: T) where T: Display + Sized { writeln!(&mut stdout, ":: {}", string).unwrap(); } -#[cfg(not(target_os="macos"))] +#[cfg(not(feature="bold_log"))] pub fn log(s: T) where T: Display + Sized { let string = Box::new(&s); let mut stdout = StandardStream::stdout(ColorChoice::Always);