mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support persisting unminified external stylesheets (#33919)
* Support local tweaking of external stylesheets Signed-off-by: Taym <haddadi.taym@gmail.com> * Remove duplicated code between unminify_css and unminify_js Signed-off-by: Taym <haddadi.taym@gmail.com> * Add License Signed-off-by: Taym <haddadi.taym@gmail.com> * Use js-beautify instead of npx Signed-off-by: Taym <haddadi.taym@gmail.com> * Fix clippy warning Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
parent
bac1101163
commit
ee68dc2589
8 changed files with 206 additions and 77 deletions
|
@ -126,6 +126,9 @@ pub struct Opts {
|
|||
/// Directory path that was created with "unminify-js"
|
||||
pub local_script_source: Option<String>,
|
||||
|
||||
/// Unminify Css.
|
||||
pub unminify_css: bool,
|
||||
|
||||
/// Print Progressive Web Metrics to console.
|
||||
pub print_pwm: bool,
|
||||
}
|
||||
|
@ -421,6 +424,7 @@ pub fn default_opts() -> Opts {
|
|||
ignore_certificate_errors: false,
|
||||
unminify_js: false,
|
||||
local_script_source: None,
|
||||
unminify_css: false,
|
||||
print_pwm: false,
|
||||
}
|
||||
}
|
||||
|
@ -560,6 +564,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
|||
"Directory root with unminified scripts",
|
||||
"",
|
||||
);
|
||||
opts.optflag("", "unminify-css", "Unminify Css");
|
||||
|
||||
let opt_match = match opts.parse(args) {
|
||||
Ok(m) => m,
|
||||
|
@ -761,6 +766,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
|||
ignore_certificate_errors: opt_match.opt_present("ignore-certificate-errors"),
|
||||
unminify_js: opt_match.opt_present("unminify-js"),
|
||||
local_script_source: opt_match.opt_str("local-script-source"),
|
||||
unminify_css: opt_match.opt_present("unminify-css"),
|
||||
print_pwm: opt_match.opt_present("print-pwm"),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue