diff --git a/components/config/opts.rs b/components/config/opts.rs index 673875cc77c..94a97ad07b7 100644 --- a/components/config/opts.rs +++ b/components/config/opts.rs @@ -124,6 +124,9 @@ pub struct Opts { /// Print Progressive Web Metrics to console. pub print_pwm: bool, + + /// True to enable minibrowser + pub minibrowser: bool, } fn print_usage(app: &str, opts: &Options) { @@ -408,6 +411,7 @@ pub fn default_opts() -> Opts { unminify_js: false, local_script_source: None, print_pwm: false, + minibrowser: false, } } @@ -541,6 +545,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR "Directory root with unminified scripts", "", ); + opts.optflag("", "minibrowser", "Open minibrowser"); let opt_match = match opts.parse(args) { Ok(m) => m, @@ -765,6 +770,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR unminify_js: opt_match.opt_present("unminify-js"), local_script_source: opt_match.opt_str("local-script-source"), print_pwm: opt_match.opt_present("print-pwm"), + minibrowser: opt_match.opt_present("minibrowser"), }; set_options(opts);