mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Allow enabling minibrowser from command line (#30042)
This commit is contained in:
parent
9fa67685f4
commit
25e2a6dfa1
1 changed files with 6 additions and 0 deletions
|
@ -124,6 +124,9 @@ pub struct Opts {
|
||||||
|
|
||||||
/// Print Progressive Web Metrics to console.
|
/// Print Progressive Web Metrics to console.
|
||||||
pub print_pwm: bool,
|
pub print_pwm: bool,
|
||||||
|
|
||||||
|
/// True to enable minibrowser
|
||||||
|
pub minibrowser: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_usage(app: &str, opts: &Options) {
|
fn print_usage(app: &str, opts: &Options) {
|
||||||
|
@ -408,6 +411,7 @@ pub fn default_opts() -> Opts {
|
||||||
unminify_js: false,
|
unminify_js: false,
|
||||||
local_script_source: None,
|
local_script_source: None,
|
||||||
print_pwm: false,
|
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",
|
"Directory root with unminified scripts",
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
|
opts.optflag("", "minibrowser", "Open minibrowser");
|
||||||
|
|
||||||
let opt_match = match opts.parse(args) {
|
let opt_match = match opts.parse(args) {
|
||||||
Ok(m) => m,
|
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"),
|
unminify_js: opt_match.opt_present("unminify-js"),
|
||||||
local_script_source: opt_match.opt_str("local-script-source"),
|
local_script_source: opt_match.opt_str("local-script-source"),
|
||||||
print_pwm: opt_match.opt_present("print-pwm"),
|
print_pwm: opt_match.opt_present("print-pwm"),
|
||||||
|
minibrowser: opt_match.opt_present("minibrowser"),
|
||||||
};
|
};
|
||||||
|
|
||||||
set_options(opts);
|
set_options(opts);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue