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

Unified Diff: third_party/closure_compiler/build/get_includes.py

Issue 2875543003: WebUI: Fix compile_js2.py to retrigger compilation for <include> files. (Closed)
Patch Set: Created 3 years, 7 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
Index: third_party/closure_compiler/build/get_includes.py
diff --git a/third_party/closure_compiler/build/get_includes.py b/third_party/closure_compiler/build/get_includes.py
new file mode 100755
index 0000000000000000000000000000000000000000..6d976dbb88a74448d73568faf06f1eeb964adf45
--- /dev/null
+++ b/third_party/closure_compiler/build/get_includes.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# 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.
+
+import os.path
+import sys
+
+
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
+import processor
+
+
+def GetIncludes(inputs):
+ includes = set()
+ for f in inputs:
+ includes.update(processor.Processor(f).included_files)
+ return includes
+
+
+if __name__ == "__main__":
+ # TODO(dpapad): Dedup inputs in ninja files, using relative paths with respect
+ # to the out directory.
+ print "\n".join(GetIncludes(sys.argv[1:]))
« no previous file with comments | « chrome/browser/resources/print_preview/compiled_resources2.gyp ('k') | third_party/closure_compiler/compile_js2.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698