use clap::{clap_derive::ValueEnum, Args, Parser, Subcommand};
#[derive(Parser, Debug, Clone)]
#[clap(version)]
pub struct App {
#[clap(short, long, action = clap::ArgAction::Count)]
pub log: u8,
#[clap(subcommand)]
pub action: Action,
#[cfg(debug_assertions)]
#[clap(skip)]
pub debug: bool,
}
#[derive(Debug, Subcommand, Clone)]
pub enum Action {
Init(InitProject),
Clone(CloneProject),
Update(UpdateFlags),
}
#[derive(Debug, Args, Clone)]
pub struct InitProject {
pub name: Option<String>,
#[clap(short, long, value_enum)]
pub exclude: Option<Exclude>,
#[clap(short, long)]
pub minimal: bool,
}
#[derive(Debug, Args, Clone)]
pub struct CloneProject {
pub path: String,
pub rename: String,
#[clap(short, long)]
pub overwrite: bool,
#[clap(short, long)]
pub skip_exist: bool,
}
#[derive(Debug, Args, Clone)]
pub struct UpdateFlags {
#[clap(short, long)]
pub version: Option<String>,
#[clap(short, long)]
pub omit_download_bar: bool,
#[clap(short, long)]
pub list: bool,
}
#[derive(Debug, Clone, ValueEnum, Default)]
pub enum Exclude {
JS,
Javascript,
CSS,
#[default]
None,
}