Skip to content

Commit

Permalink
refactor(cli): rename plugin add command to add (#7744)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Sep 7, 2023
1 parent 7db1c31 commit 974e38b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/move-add-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:breaking
"@tauri-apps/cli": patch:breaking
---

Renamed the `plugin add` command to `add`.
File renamed without changes.
3 changes: 3 additions & 0 deletions tooling/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

pub use anyhow::Result;

mod add;
mod build;
mod completions;
mod dev;
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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)?,
Expand Down
3 changes: 0 additions & 3 deletions tooling/cli/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use clap::{Parser, Subcommand};

use crate::Result;

mod add;
mod android;
mod init;
mod ios;
Expand All @@ -27,15 +26,13 @@ pub struct Cli {
#[derive(Subcommand)]
enum Commands {
Init(init::Options),
Add(add::Options),
Android(android::Cli),
Ios(ios::Cli),
}

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)?,
}
Expand Down

0 comments on commit 974e38b

Please sign in to comment.