From e6b2585b4608902b91e4fbb92f8c9ff1e2946b27 Mon Sep 17 00:00:00 2001 From: Adam Sharp Date: Fri, 9 Mar 2018 20:01:10 -0500 Subject: [PATCH] Make cli an optional feature in the top-level crate --- Cargo.toml | 9 +++++++-- dotenv_cli/Cargo.toml | 12 ------------ dotenv_cli/src/main.rs => src/bin/dotenv.rs | 0 3 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 dotenv_cli/Cargo.toml rename dotenv_cli/src/main.rs => src/bin/dotenv.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index ed839e4..8c329d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ authors = [ "Mike Piccolo ", "Alice Maz ", "Sean Griffin ", + "Adam Sharp ", ] readme = "README.md" keywords = ["environment", "env", "dotenv", "settings", "config"] @@ -21,12 +22,16 @@ derive-error-chain = "0.11.0" error-chain = { version = "0.11.0", default-features = false } regex = "0.2.1" +clap = { version = "2", optional = true } + [dev-dependencies] tempdir = "0.3.0" [features] backtrace = ["error-chain/backtrace"] +cli = ["clap"] default = ["backtrace"] -[workspace] -members = ["dotenv_cli"] +[[bin]] +name = "dotenv" +required-features = ["cli"] diff --git a/dotenv_cli/Cargo.toml b/dotenv_cli/Cargo.toml deleted file mode 100644 index 8d12e49..0000000 --- a/dotenv_cli/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "dotenv_cli" -version = "0.1.0" -authors = ["Adam Sharp "] - -[[bin]] -name = "dotenv" -path = "src/main.rs" - -[dependencies] -clap = "2" -dotenv = "0.10.1" diff --git a/dotenv_cli/src/main.rs b/src/bin/dotenv.rs similarity index 100% rename from dotenv_cli/src/main.rs rename to src/bin/dotenv.rs