implement annotations (#4763)

This commit is contained in:
Alex Lam S.L
2021-03-12 19:40:49 +00:00
committed by GitHub
parent c36c3cb470
commit 3b5d5014e0
15 changed files with 690 additions and 552 deletions

View File

@@ -95,6 +95,8 @@ function process_option(name, no_value) {
" -b, --beautify [options] Beautify output/specify output options.",
" -O, --output-opts <options> Output options (beautify disabled).",
" -o, --output <file> Output file (default STDOUT).",
" --annotations Process and preserve comment annotations.",
" --no-annotations Ignore and discard comment annotations.",
" --comments [filter] Preserve copyright comments in the output.",
" --config-file <file> Read minify() options from JSON file.",
" -d, --define <expr>[=value] Global definitions.",
@@ -142,6 +144,7 @@ function process_option(name, no_value) {
case "enclose":
options[name] = read_value();
break;
case "annotations":
case "ie8":
case "timings":
case "toplevel":
@@ -149,6 +152,9 @@ function process_option(name, no_value) {
case "webkit":
options[name] = true;
break;
case "no-annotations":
options.annotations = false;
break;
case "keep-fnames":
options.keep_fnames = true;
break;