mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 03:58:34 +02:00
Upgrade Nomulus to latest Closure Rules
Significant technical debt has been eliminated. The latest best practices are also now adopted for dealing with runfiles and dealing with files across repositories. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140762937
This commit is contained in:
parent
79a72387ee
commit
59f4984083
28 changed files with 193 additions and 361 deletions
|
@ -6,12 +6,10 @@ licenses(["notice"]) # Apache 2.0
|
|||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library")
|
||||
|
||||
filegroup(
|
||||
name = "js_files",
|
||||
srcs = [
|
||||
"Console.soy.js",
|
||||
"Forms.soy.js",
|
||||
],
|
||||
closure_js_template_library(
|
||||
name = "soy",
|
||||
srcs = glob(["*.soy"]),
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_java_template_library(
|
||||
|
@ -19,15 +17,3 @@ closure_java_template_library(
|
|||
srcs = glob(["*.soy"]),
|
||||
java_package = "google.registry.ui.soy",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Console",
|
||||
srcs = ["Console.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Forms",
|
||||
srcs = ["Forms.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
|
|
@ -50,13 +50,8 @@
|
|||
{case google.registry.ui.ConsoleDebug.DEBUG}
|
||||
<link rel="stylesheet" href="/assets/css/{$app}_dbg.css">
|
||||
{case google.registry.ui.ConsoleDebug.RAW}
|
||||
{if $app == 'admin'}
|
||||
<link rel="stylesheet"
|
||||
href="/assets/sources/java/google/registry/ui/css/admin_imports_raw.css">
|
||||
{else}
|
||||
<link rel="stylesheet"
|
||||
href="/assets/sources/java/google/registry/ui/css/registrar_imports_raw.css">
|
||||
{/if}
|
||||
<link rel="stylesheet"
|
||||
href="/assets/sources/domain_registry/java/google/registry/ui/css/{$app}_imports_raw.css">
|
||||
{default}
|
||||
<!-- No DEBUG option set. -->
|
||||
{/switch}
|
||||
|
|
|
@ -6,22 +6,12 @@ licenses(["notice"]) # Apache 2.0
|
|||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library")
|
||||
|
||||
filegroup(
|
||||
name = "js_files",
|
||||
srcs = [
|
||||
"Console.soy.js",
|
||||
"Contact.soy.js",
|
||||
"ContactEpp.soy.js",
|
||||
"ContactSettings.soy.js",
|
||||
"Domain.soy.js",
|
||||
"DomainEpp.soy.js",
|
||||
"Epp.soy.js",
|
||||
"Host.soy.js",
|
||||
"HostEpp.soy.js",
|
||||
"Payment.soy.js",
|
||||
"SecuritySettings.soy.js",
|
||||
"WhoisSettings.soy.js",
|
||||
],
|
||||
closure_js_template_library(
|
||||
name = "registrar",
|
||||
srcs = glob(["*.soy"]),
|
||||
data = ["//java/google/registry/ui/css:registrar_raw"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy"],
|
||||
)
|
||||
|
||||
closure_java_template_library(
|
||||
|
@ -29,82 +19,3 @@ closure_java_template_library(
|
|||
srcs = glob(["*.soy"]),
|
||||
java_package = "google.registry.ui.soy.registrar",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Console",
|
||||
srcs = ["Console.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Console"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "ContactEpp",
|
||||
srcs = ["ContactEpp.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "ContactSettings",
|
||||
srcs = ["ContactSettings.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Contact",
|
||||
srcs = ["Contact.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Domain",
|
||||
srcs = ["Domain.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "DomainEpp",
|
||||
srcs = ["DomainEpp.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Epp",
|
||||
srcs = ["Epp.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "HostEpp",
|
||||
srcs = ["HostEpp.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Host",
|
||||
srcs = ["Host.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "Payment",
|
||||
srcs = ["Payment.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "SecuritySettings",
|
||||
srcs = ["SecuritySettings.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
)
|
||||
|
||||
closure_js_template_library(
|
||||
name = "WhoisSettings",
|
||||
srcs = ["WhoisSettings.soy"],
|
||||
globals = "//java/google/registry/ui:globals.txt",
|
||||
deps = ["//java/google/registry/ui/soy:Forms"],
|
||||
)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
{@param xsrfToken: string} /** Security token. */
|
||||
{@param clientId: string} /** Registrar client identifier. */
|
||||
{@param username: string} /** Arbitrary username to display. */
|
||||
{@param isAdmin: bool} /** Is this user an App Engine account admin? */
|
||||
{@param logoutUrl: string} /** Generated URL for logging out of Google. */
|
||||
{@param showPaymentLink: bool}
|
||||
{@param productName: string} /** Name to display for this software product. */
|
||||
|
@ -51,18 +50,13 @@
|
|||
</div>
|
||||
{switch DEBUG}
|
||||
{case google.registry.ui.ConsoleDebug.PRODUCTION}
|
||||
{if $isAdmin}
|
||||
<script src="/assets/js/registrar_bin_map.js"></script>
|
||||
{else}
|
||||
<script src="/assets/js/registrar_bin.js"></script>
|
||||
{/if}
|
||||
<script src="/assets/js/registrar_bin.js"></script>
|
||||
{case google.registry.ui.ConsoleDebug.DEBUG}
|
||||
<script src="/assets/js/registrar_dbg.js"></script>
|
||||
{case google.registry.ui.ConsoleDebug.RAW}
|
||||
<script>var CLOSURE_NO_DEPS = true;</script>
|
||||
<script src="/assets/sources/external/closure_library/closure/goog/base.js">
|
||||
</script>
|
||||
<script src="/assets/sources/deps.js"></script>
|
||||
<script src="/assets/sources/closure_library/closure/goog/base.js"></script>
|
||||
<script src="/assets/sources/domain_registry/java/google/registry/ui/deps.js"></script>
|
||||
<script>goog.require('registry.registrar.main');</script>
|
||||
{/switch}
|
||||
{if isNonnull(DEBUG)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue