diff --git a/.github/img/Artboard 1.svg b/.github/img/Artboard 1.svg deleted file mode 100644 index aebeeb6..0000000 --- a/.github/img/Artboard 1.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.github/img/logo-cli-colors.svg b/.github/img/logo-cli-colors.svg index b84e915..a472c06 100644 --- a/.github/img/logo-cli-colors.svg +++ b/.github/img/logo-cli-colors.svg @@ -1,4 +1,4 @@ - + - - - - - - - - - - + + \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e2a2300..cc8173f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,9 @@ index = "sparse+http://lugit.local/api/packages/lucodear/cargo/" [lib] path = "lib/lib.rs" +[features] +cli-stylize = ["dep:bitflags"] + [dependencies] -bitflags = "2.5.0" +bitflags = { version = "2.5.0", optional = true} eyre = { version = "0.6.12", default-features = false } diff --git a/Taskfile.yaml b/Taskfile.yaml index bf028c9..c265afa 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -32,7 +32,7 @@ tasks: test: desc: 🧪 test lool cmds: - - cargo nextest run + - cargo nextest run --all-features publish: desc: 🚀 publish lool diff --git a/examples/stylizer.rs b/examples/stylizer.rs index 0c032e7..ca068ec 100644 --- a/examples/stylizer.rs +++ b/examples/stylizer.rs @@ -1,5 +1,5 @@ use eyre::{set_hook, DefaultHandler, Result}; -use lool::cli::colors::{stylize, Stylize}; +use lool::cli::stylize::{stylize, Stylize}; fn setup_eyre() { let _ = set_hook(Box::new(DefaultHandler::default_with)); diff --git a/lib/cli/colors/tests/mod.rs b/lib/cli/colors/tests/mod.rs deleted file mode 100644 index 0f92e3b..0000000 --- a/lib/cli/colors/tests/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod stylizer; \ No newline at end of file diff --git a/lib/cli/mod.rs b/lib/cli/mod.rs index 40fd5c1..9168981 100644 --- a/lib/cli/mod.rs +++ b/lib/cli/mod.rs @@ -1 +1,2 @@ -pub mod colors; +#[cfg(feature = "cli-stylize")] +pub mod stylize; diff --git a/lib/cli/colors.rs b/lib/cli/stylize.rs similarity index 100% rename from lib/cli/colors.rs rename to lib/cli/stylize.rs diff --git a/lib/cli/colors/README.md b/lib/cli/stylize/README.md similarity index 100% rename from lib/cli/colors/README.md rename to lib/cli/stylize/README.md diff --git a/lib/cli/colors/style.rs b/lib/cli/stylize/style.rs similarity index 100% rename from lib/cli/colors/style.rs rename to lib/cli/stylize/style.rs diff --git a/lib/cli/colors/stylizer.rs b/lib/cli/stylize/stylizer.rs similarity index 100% rename from lib/cli/colors/stylizer.rs rename to lib/cli/stylize/stylizer.rs diff --git a/lib/cli/stylize/tests/mod.rs b/lib/cli/stylize/tests/mod.rs new file mode 100644 index 0000000..3527187 --- /dev/null +++ b/lib/cli/stylize/tests/mod.rs @@ -0,0 +1 @@ +mod stylizo; \ No newline at end of file diff --git a/lib/cli/colors/tests/stylizer.rs b/lib/cli/stylize/tests/stylizo.rs similarity index 99% rename from lib/cli/colors/tests/stylizer.rs rename to lib/cli/stylize/tests/stylizo.rs index 1b5912d..07cacf2 100644 --- a/lib/cli/colors/tests/stylizer.rs +++ b/lib/cli/stylize/tests/stylizo.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod parse_instruction { use { - crate::cli::colors::{ + crate::cli::stylize::{ stylizer::instructions::{parse, parse_color_instruction}, style::{Color, StyleAttributes} }, eyre::{set_hook, DefaultHandler} }; diff --git a/🧳 lool.code-workspace b/🧳 lool.code-workspace index d7fc36a..6142bee 100644 --- a/🧳 lool.code-workspace +++ b/🧳 lool.code-workspace @@ -12,9 +12,11 @@ "lucodear-icons.activeIconPack": "rust_ferris", "lucodear-icons.folders.associations": { ".cargo": "rust", + "stylize": "theme" }, "lucodear-icons.files.associations": { - } + }, + "rust-analyzer.cargo.features": "all", } }