Index: third_party/closure_compiler/compile_js.gni |
diff --git a/third_party/closure_compiler/compile_js.gni b/third_party/closure_compiler/compile_js.gni |
index 958ac1bc9b7c897d2d3af141bd79b371203cb2f2..329bb75f0d03fdaacbf5f2ecbfd37f3472a9dccb 100644 |
--- a/third_party/closure_compiler/compile_js.gni |
+++ b/third_party/closure_compiler/compile_js.gni |
@@ -17,6 +17,10 @@ compiler_path = "$script_path/compiler/compiler.jar" |
# deps: |
# List of js_library targets to depend on |
# |
+# extra_deps: |
+# List of any other rules to depend on. E.g. a rule that generates js source |
+# files |
+# |
# Example: |
# js_library("apple_tree") { |
# sources = ["tree_main.js"] |
@@ -36,6 +40,7 @@ template("js_library") { |
[ |
"sources", |
"deps", |
+ "extra_deps", |
]) |
output_file = "$target_gen_dir/$target_name.js_library" |
outputs = [ |
@@ -55,6 +60,12 @@ template("js_library") { |
args += [ rebase_path(dep_output_path, root_build_dir) ] |
} |
} |
+ if (defined(extra_deps)) { |
+ if (!defined(deps)) { |
+ deps = [] |
+ } |
+ deps += extra_deps |
+ } |
} |
} |