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

Unified Diff: third_party/closure_compiler/compile_js.gni

Issue 2902583002: Add some closureised JS bindings for DevTools for use by headless embedder (Closed)
Patch Set: Don't run the test on windows because js_binary doesn't work 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
« headless/test/test_harness.js ('K') | « headless/test/test_harness.js ('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/compile_js.gni
diff --git a/third_party/closure_compiler/compile_js.gni b/third_party/closure_compiler/compile_js.gni
index 958ac1bc9b7c897d2d3af141bd79b371203cb2f2..36ea9a0ad4e68e09ff614baf5b1e60f5bbfcb192 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:
Sami 2017/05/24 09:16:22 I think renaming this to js_deps instead would mak
alex clarke (OOO till 29th) 2017/05/24 11:38:19 +dbeam@ WDYT?
# 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
+ }
}
}
@@ -69,6 +80,10 @@ template("js_library") {
# deps:
# List of js_library rules to depend on
#
+# extra_deps:
+# List of any other rules to depend on. E.g. a rule that generates js source
+# files
+#
# outputs:
# A file to write the compiled .js to.
# Only takes in a single file, but must be placed in a list
@@ -117,6 +132,7 @@ template("js_binary") {
"config_files",
"closure_flags",
"externs_list",
+ "extra_deps",
])
args = [
"--compiler",
@@ -138,6 +154,12 @@ template("js_binary") {
args += [ rebase_path(dep_output_path, root_build_dir) ]
}
}
+ if (defined(extra_deps)) {
+ if (!defined(deps)) {
+ deps = []
+ }
+ deps += extra_deps
+ }
if (defined(bootstrap_file)) {
args += [
"--bootstrap",
« headless/test/test_harness.js ('K') | « headless/test/test_harness.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698