mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 11:13:48 +02:00
Move build/dev/generate/publish under plugin command
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::cli::{GenerateArgs, PluginPathArg};
|
||||
use crate::cli::{GenerateArgs, PluginArgs, PluginCommands, PluginPathArg};
|
||||
use crate::ui;
|
||||
use keyring::Entry;
|
||||
use rand::Rng;
|
||||
@@ -57,6 +57,15 @@ pub async fn run_build(args: PluginPathArg) -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run(args: PluginArgs) -> i32 {
|
||||
match args.command {
|
||||
PluginCommands::Build(args) => run_build(args).await,
|
||||
PluginCommands::Dev(args) => run_dev(args).await,
|
||||
PluginCommands::Generate(args) => run_generate(args).await,
|
||||
PluginCommands::Publish(args) => run_publish(args).await,
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run_dev(args: PluginPathArg) -> i32 {
|
||||
match dev(args).await {
|
||||
Ok(()) => 0,
|
||||
|
||||
Reference in New Issue
Block a user