1use crate::*;
2
3#[derive(Clone, Data, Debug, New, Parser)]
9#[command(name = "euv")]
10#[command(about = "euv development server with live WASM compilation")]
11pub struct Cli {
12 #[command(subcommand)]
14 #[get_mut(pub(crate))]
15 #[set(pub(crate))]
16 pub(crate) command: Mode,
17}
18
19#[derive(Clone, Data, Debug, Parser)]
24pub struct ModeArgs {
25 #[arg(short, long, default_value = ".")]
27 #[get(pub(crate))]
28 #[get_mut(pub(crate))]
29 #[set(pub(crate))]
30 pub(crate) crate_path: PathBuf,
31 #[arg(short, long, default_value_t = 80)]
33 #[get(pub(crate), type(copy))]
34 #[get_mut(pub(crate))]
35 #[set(pub(crate))]
36 pub(crate) port: u16,
37 #[arg(long, default_value = "www")]
39 #[get(pub(crate))]
40 #[get_mut(pub(crate))]
41 #[set(pub(crate))]
42 pub(crate) www_dir: String,
43 #[arg(long)]
47 #[get(pub(crate))]
48 #[get_mut(pub(crate))]
49 #[set(pub(crate))]
50 pub(crate) index_html: Option<PathBuf>,
51 #[arg(long)]
53 #[get(pub(crate), type(copy))]
54 #[get_mut(pub(crate))]
55 #[set(pub(crate))]
56 pub(crate) dev: bool,
57 #[arg(long)]
59 #[get(pub(crate), type(copy))]
60 #[get_mut(pub(crate))]
61 #[set(pub(crate))]
62 pub(crate) release: bool,
63 #[arg(long)]
65 #[get(pub(crate), type(copy))]
66 #[get_mut(pub(crate))]
67 #[set(pub(crate))]
68 pub(crate) profiling: bool,
69 #[arg(long)]
71 #[get(pub(crate), type(copy))]
72 #[get_mut(pub(crate))]
73 #[set(pub(crate))]
74 pub(crate) no_gitignore: bool,
75 #[arg(trailing_var_arg = true, allow_hyphen_values = true)]
77 #[get(pub(crate))]
78 #[get_mut(pub(crate))]
79 #[set(pub(crate))]
80 pub(crate) wasm_pack_args: Vec<String>,
81}
82
83#[derive(Clone, Data, Debug, New, Parser)]
88pub struct FmtArgs {
89 #[arg(short, long, default_value = ".")]
91 pub(crate) path: PathBuf,
92 #[arg(long, default_value_t = false)]
94 #[get(type(copy))]
95 pub(crate) check: bool,
96}
97
98#[derive(Clone, Data, Debug, New)]
102pub(crate) struct ServerUrlConfig {
103 #[get(pub(crate), type(copy))]
105 #[get_mut(pub(crate))]
106 #[set(pub(crate))]
107 pub(crate) port: u16,
108 #[get(pub(crate))]
110 #[get_mut(pub(crate))]
111 #[set(pub(crate))]
112 pub(crate) route_prefix: String,
113 #[get(pub(crate))]
115 #[get_mut(pub(crate))]
116 #[set(pub(crate))]
117 pub(crate) index_html_file_name: String,
118}