Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: remoting/webapp/build-html.py

Issue 1296283002: Create list file for GN target //remoting/webapp:unit_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/BUILD.gn ('k') | remoting/webapp/files.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « remoting/webapp/BUILD.gn ('k') | remoting/webapp/files.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698