google-nomulus/java/google/registry/ui/BUILD
Justine Tunney 7f3f03ee97 MOE strip compatible_with
This is an internal-only feature that breaks the open source build.

CL created with:

    dr-replace '(compatible_with.*)' '\1  # MOE:strip_line'

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128852873
2016-08-02 19:14:28 -04:00

140 lines
4.1 KiB
Text

package(default_visibility = ["//java/google/registry:registry_project"])
licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_deps")
exports_files(["globals.txt"])
filegroup(
name = "assets_recursive",
srcs = glob(["assets/**"]),
)
filegroup(
name = "js_files_recursive",
srcs = [
"//java/google/registry/ui/js:js_files",
"//java/google/registry/ui/js/registrar:js_files",
"//java/google/registry/ui/soy:js_files",
"//java/google/registry/ui/soy/registrar:js_files",
],
)
filegroup(
name = "runfiles",
srcs = [
"brain_bin.js",
"brain_bin_map.js",
"registrar_bin.js",
"registrar_bin_map.js",
":assets_recursive",
"//javascript/closure:js_files_recursive",
"//javascript/template/soy:soy_usegoog_js_files",
"//java/google/registry/ui:deps.js",
"//java/google/registry/ui/css:registrar_bin.css",
"//java/google/registry/ui/html:html_files",
],
)
filegroup(
name = "runfiles_debug",
srcs = [
"@closure_library//:js_files",
"brain_bin.js.map",
"deps.js",
"registrar_bin.js.map",
":js_files_recursive",
":runfiles",
"//javascript/closure:js_files_recursive",
"//javascript/template/soy:soy_usegoog_js_files",
"//java/google/registry/ui/css:css_files",
],
)
java_library(
name = "ui",
srcs = glob(["*.java"]),
deps = [
"//java/com/google/common/base",
"//third_party/java/appengine:appengine-api",
"//third_party/java/dagger",
"//third_party/java/jsr305_annotations",
"//java/google/registry/config",
],
)
closure_js_deps(
name = "deps",
deps = [
"//java/google/registry/ui/js",
"//java/google/registry/ui/js/registrar",
],
)
################################################################################
## Registrar Console
# This is the full-blown compiled JavaScript source code for the registrar
# console. Everything, including the soy templates, is compiled into a single
# .js file. The only symbols that will be available are the ones you @export.
# This will also replace calls to goog.getCssName() and {css ...} with their
# non-union minified equivalents.
closure_js_binary(
name = "registrar_bin",
css = "//java/google/registry/ui/css:registrar_bin",
entry_points = ["goog:registry.registrar.main"],
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)
# The webserver should provide this to trusted admin users, rather than
# registrar_bin.js. This is what makes debugging in production possible.
genrule(
name = "registrar_mapped",
srcs = ["registrar_bin.js"],
outs = ["registrar_bin_map.js"],
cmd = "cat $(location registrar_bin.js) >$@ && " +
"echo '//# sourceMappingURL=registrar_bin.js.map' >>$@",
)
# This target creates a compiled JavaScript file where symbols are renamed to
# include dollar signs. This is useful for testing, because you can still read
# the source code, but it'll fail if your code is incorrect with regard to
# dotted and quoted properties. The same applies to CSS class names, which get
# an extra underscore.
closure_js_binary(
name = "registrar_dbg",
css = "//java/google/registry/ui/css:registrar_dbg",
debug = 1,
entry_points = ["goog:registry.registrar.main"],
formatting = "PRETTY_PRINT",
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)
################################################################################
## Braintree Payment Method Frame (Brainframe)
closure_js_binary(
name = "brain_bin",
entry_points = ["goog:registry.registrar.BrainFrame.main"],
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)
genrule(
name = "brain_mapped",
srcs = ["brain_bin.js"],
outs = ["brain_bin_map.js"],
cmd = "cat $(location brain_bin.js) >$@ && " +
"echo '//# sourceMappingURL=brain_bin.js.map' >>$@",
)