russel 0.0.2

A simple static site builder I built for myself.
Documentation
use console::style;
use russel::{build_cli, commands};
use std::process;

#[tokio::main]
async fn main() {
    let matches = build_cli().get_matches();

    let result = match matches.subcommand() {
        Some(("build", sub_matches)) => commands::build::handle_command(sub_matches),
        Some(("dev", sub_matches)) => commands::dev::handle_command(sub_matches).await,
        Some(("gen", sub_matches)) => commands::generate::handle_command(sub_matches),
        Some(("new", sub_matches)) => commands::new::handle_command(sub_matches),
        _ => {
            println!("No command specified. Use --help for usage information.");
            Ok(())
        }
    };

    match result {
        Ok(_) => {
            process::exit(0);
        }
        Err(err) => {
            println!("{}", style(err.to_string()).red().bold());
            process::exit(1)
        }
    }
}