From 97cceccfcdce70d6b7d296281164d442966f09be Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 4 Sep 2023 09:42:51 -0300 Subject: [PATCH] refactor(cli): rename `plugin add` command to `add` --- .changes/move-add-command.md | 6 ++++++ tooling/cli/src/{plugin => }/add.rs | 0 tooling/cli/src/lib.rs | 3 +++ tooling/cli/src/plugin.rs | 3 --- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/move-add-command.md rename tooling/cli/src/{plugin => }/add.rs (100%) diff --git a/.changes/move-add-command.md b/.changes/move-add-command.md new file mode 100644 index 000000000000..3a4bac9ca63d --- /dev/null +++ b/.changes/move-add-command.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch +"@tauri-apps/cli": patch +--- + +Renamed the `plugin add` command to `add`. diff --git a/tooling/cli/src/plugin/add.rs b/tooling/cli/src/add.rs similarity index 100% rename from tooling/cli/src/plugin/add.rs rename to tooling/cli/src/add.rs diff --git a/tooling/cli/src/lib.rs b/tooling/cli/src/lib.rs index edba74ed5663..bceb874c40d0 100644 --- a/tooling/cli/src/lib.rs +++ b/tooling/cli/src/lib.rs @@ -13,6 +13,7 @@ pub use anyhow::Result; +mod add; mod build; mod completions; mod dev; @@ -99,6 +100,7 @@ pub(crate) struct Cli { enum Commands { Build(build::Options), Dev(dev::Options), + Add(add::Options), Icon(icon::Options), Info(info::Options), Init(init::Options), @@ -205,6 +207,7 @@ where match cli.command { Commands::Build(options) => build::command(options, cli.verbose)?, Commands::Dev(options) => dev::command(options)?, + Commands::Add(options) => add::command(options)?, Commands::Icon(options) => icon::command(options)?, Commands::Info(options) => info::command(options)?, Commands::Init(options) => init::command(options)?, diff --git a/tooling/cli/src/plugin.rs b/tooling/cli/src/plugin.rs index 89c7153ead17..2809e643267f 100644 --- a/tooling/cli/src/plugin.rs +++ b/tooling/cli/src/plugin.rs @@ -6,7 +6,6 @@ use clap::{Parser, Subcommand}; use crate::Result; -mod add; mod android; mod init; mod ios; @@ -27,7 +26,6 @@ pub struct Cli { #[derive(Subcommand)] enum Commands { Init(init::Options), - Add(add::Options), Android(android::Cli), Ios(ios::Cli), } @@ -35,7 +33,6 @@ enum Commands { pub fn command(cli: Cli) -> Result<()> { match cli.command { Commands::Init(options) => init::command(options)?, - Commands::Add(options) => add::command(options)?, Commands::Android(cli) => android::command(cli)?, Commands::Ios(cli) => ios::command(cli)?, }