1pub const DEFAULT_PORT: u16 = 3000;
2
3#[derive(Debug, Clone, clap::Parser)]
4pub struct DevServerConfig {
5 #[clap(
6 long,
7 default_value_t = DEFAULT_PORT,
8 help = "Port to run the development server on"
9 )]
10 pub port: u16,
11 #[clap(
12 default_value = "./",
13 help = "Base directory for the development server"
14 )]
15 pub base_dir: String,
16 #[clap(
17 long,
18 default_value_t = false,
19 help = "Enable diff mode to update HTML/CSS without full page reloads"
20 )]
21 pub diff_mode: bool,
22 #[clap(
23 long = "no-open-browser",
24 default_value_t = false,
25 action = clap::ArgAction::SetTrue,
26 help = "Disable automatically opening the default browser"
27 )]
28 pub no_open_browser: bool,
29}