cli/commands/run/mod.rs
1mod android;
2mod apple;
3
4use crate::error::Result;
5use clap::Clap;
6use creator_tools::utils::Config;
7
8#[derive(Clap, Clone, Debug)]
9pub enum RunCommand {
10 /// Executes `build` command and then deploy and launches the application on the Android device/emulator
11 Android(android::AndroidRunCommand),
12 /// Executes `build` command and then deploy and launches the application on the iOS device/emulator
13 Apple(apple::AppleRunCommand),
14}
15
16impl RunCommand {
17 pub fn handle_command(&self, config: &Config) -> Result<()> {
18 match &self {
19 Self::Android(cmd) => cmd.run(config),
20 Self::Apple(cmd) => cmd.run(config),
21 }
22 }
23}