Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): rename plugin add command to add #7744

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading