tauri/tooling/cli/src/plugin.rs

36 lines
612 B
Rust
Raw Normal View History

2023-02-19 16:17:49 +03:00
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
2022-02-27 23:35:43 +03:00
use clap::{Parser, Subcommand};
use crate::Result;
mod init;
#[derive(Parser)]
2022-02-27 23:35:43 +03:00
#[clap(
author,
version,
about = "Manage Tauri plugins",
subcommand_required(true),
arg_required_else_help(true)
)]
pub struct Cli {
#[clap(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Init(init::Options),
}
pub fn command(cli: Cli) -> Result<()> {
match cli.command {
Commands::Init(options) => init::command(options)?,
}
Ok(())
}