use clap::Parser;
use miette::Result;
mod list_themes;
mod new;
mod run;
mod validate;
use list_themes::ListThemes;
use new::New;
use run::Run;
use validate::Validate;
#[derive(Debug, Parser)]
pub enum Command {
New(New),
Run(Run),
Themes(ListThemes),
Validate(Validate),
}
impl Command {
pub fn run(&self) -> Result<()> {
match self {
Command::New(command) => command.run()?,
Command::Run(command) => command.run()?,
Command::Themes(command) => command.run()?,
Command::Validate(command) => command.run()?,
}
Ok(())
}
}