| Index: mojo/public/js/BUILD.gn
|
| diff --git a/mojo/public/js/BUILD.gn b/mojo/public/js/BUILD.gn
|
| index eda7e04d07ef67f2e819bcbfb6fa1da79803f8bc..a2e2fc3da50f7f95f4d06fd53ca76596967d7a8d 100644
|
| --- a/mojo/public/js/BUILD.gn
|
| +++ b/mojo/public/js/BUILD.gn
|
| @@ -2,6 +2,8 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import("//build/util/java_action.gni")
|
| +
|
| source_set("js") {
|
| sources = [
|
| "constants.cc",
|
| @@ -27,6 +29,50 @@ group("bindings") {
|
| ]
|
| }
|
|
|
| +template("js_binary") {
|
| + closure_compiler_path = "//third_party/closure_compiler/compiler/compiler.jar"
|
| + output_file_path = "$target_gen_dir/$target_name.js"
|
| +
|
| + java_action(target_name) {
|
| + script = closure_compiler_path
|
| + sources = invoker.sources
|
| + outputs = [
|
| + "$output_file_path",
|
| + ]
|
| + args = [
|
| + "--compilation_level",
|
| + "WHITESPACE_ONLY",
|
| + "--dependency_mode",
|
| + "STRICT",
|
| + "--transform_amd_modules",
|
| + "--process_common_js_modules",
|
| + "--language_out",
|
| + "ECMASCRIPT5",
|
| + "--formatting",
|
| + "PRETTY_PRINT",
|
| + "--js_output_file",
|
| + rebase_path("$output_file_path", root_build_dir),
|
| + "--entry_point",
|
| + rebase_path("main.js", root_build_dir),
|
| + "--js",
|
| + ] + rebase_path(sources, root_build_dir)
|
| + }
|
| +}
|
| +
|
| +js_binary("lib") {
|
| + sources = [
|
| + "bindings.js",
|
| + "buffer.js",
|
| + "codec.js",
|
| + "connection.js",
|
| + "connector.js",
|
| + "main.js",
|
| + "router.js",
|
| + "unicode.js",
|
| + "validator.js",
|
| + ]
|
| +}
|
| +
|
| group("tests") {
|
| testonly = true
|
|
|
|
|