Index: remoting/webapp/build-html.py |
diff --git a/remoting/webapp/build-html.py b/remoting/webapp/build-html.py |
index 17d9a6ac1ec0de2158326cd2defd183a30e423fb..8973b6f06cb3668599ca5aa0bc9dda5a913d9388 100755 |
--- a/remoting/webapp/build-html.py |
+++ b/remoting/webapp/build-html.py |
@@ -113,7 +113,17 @@ class GenerateWebappHtml: |
def parseArgs(): |
parser = argparse.ArgumentParser() |
parser.add_argument( |
- '--js', nargs='+', help='The Javascript files to include in HTML <head>') |
+ '--js', |
+ nargs='+', |
+ default={}, |
+ help='The Javascript files to include in HTML <head>') |
+ parser.add_argument( |
+ '--js-list-file', |
+ help='The name of a file containing a list of files, one per line, ' |
+ 'identifying the Javascript to include in HTML <head>. This is an ' |
+ 'alternate to specifying the files directly via the "--js" option. ' |
+ 'The files listed in this file are appended to the files passed via ' |
+ 'the "--js" option, if any.') |
parser.add_argument( |
'--templates', |
nargs='*', |
@@ -142,7 +152,14 @@ def main(): |
args = parseArgs() |
out_file = args.output_file |
- js_files = set(args.js) - set(args.exclude_js) |
+ js_files = set(args.js) |
+ |
+ # Load the files from the --js-list-file. |
+ js_list_file = args.js_list_file |
+ if js_list_file: |
+ js_files = js_files.union(set(line.rstrip() for line in open(js_list_file))) |
+ |
+ js_files = js_files - set(args.exclude_js) |
instrumented_js_files = set(args.instrument_js) - set(args.exclude_js) |
# Create the output directory if it does not exist. |