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

Unified Diff: third_party/closure_compiler/js_library.py

Issue 2800833004: Create js_library and js_binary templates for closure compiling. (Closed)
Patch Set: update comments Created 3 years, 8 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 | « third_party/closure_compiler/js_binary.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/js_library.py
diff --git a/third_party/closure_compiler/js_library.py b/third_party/closure_compiler/js_library.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d153d021b43c5ae704b9cde7cdd741cd1e9eb3b
--- /dev/null
+++ b/third_party/closure_compiler/js_library.py
@@ -0,0 +1,29 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Generates a file describing the js_library to be used by js_binary action.
+
+This script takes in a list of sources and dependencies as described by a
+js_library action. It creates a file listing the sources and dependencies
+that can later be used by a js_binary action to compile the javascript.
+"""
+
+from argparse import ArgumentParser
+
+
+def main():
+ parser = ArgumentParser()
+ parser.add_argument('-s', '--sources', nargs='*', default=[],
+ help='List of js source files')
+ parser.add_argument('-o', '--output', help='Write list to output')
+ parser.add_argument('-d', '--deps', nargs='*', default=[],
+ help='List of js_library dependencies')
+ args = parser.parse_args()
+
+ with open(args.output, 'w') as out:
+ out.write('sources:\n%s\ndeps:\n%s' % ('\n'.join(args.sources),
+ '\n'.join(args.deps)))
+
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « third_party/closure_compiler/js_binary.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698