This repository has been archived by the owner on May 3, 2021. It is now read-only.
/
BUILD.bazel
67 lines (55 loc) · 1.77 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_library")
BASE_DEFS = [
"--define=bloombox.SERVICE_MODE=binary",
"--define=jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=false",
"--define=goog.net.XmlHttp.ASSUME_NATIVE_XHR=true",
"--define=goog.json.USE_NATIVE_JSON=true",
"--define=goog.TRUSTED_SITE=false",
"--define=goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST=true"
]
DEBUG_DEFS = [
"--define=goog.DEBUG=true",
"--define=bloombox.DEBUG=true",
"--define=goog.log.ENABLED=true"
] + BASE_DEFS
OPTIMIZED_DEFS = [
"--define=goog.DEBUG=false",
"--define=bloombox.DEBUG=false",
"--define=goog.log.ENABLED=false",
] + BASE_DEFS
closure_js_library(
name = "sources",
exports = [
"//src/base:base",
"//src/db:db",
"//src/rpc:rpc",
"//src/menu:menu",
"//src/shop:shop",
"//src/util:util",
"//src/telemetry:telemetry"])
closure_js_library(
name = "full",
exports = [
":sources",
"//entrypoint:sdk-full"])
## Target: Debug
closure_js_binary(
name = "sdk-debug",
deps = [":full"],
debug = True,
defs = ["--define=bloombox.VARIANT='full'"] + DEBUG_DEFS,
entry_points = ["goog:bloombox.setup"],
dependency_mode = "STRICT",
compilation_level = "ADVANCED",
output_wrapper = "(function(){%output%}).call(this);")
## Target: Optimized
closure_js_binary(
name = "sdk",
deps = ["//entrypoint:sdk-full"],
debug = False,
defs = ["--define=bloombox.VARIANT='full'"] + OPTIMIZED_DEFS,
entry_points = ["goog:bloombox.setup"],
dependency_mode = "STRICT",
compilation_level = "ADVANCED",
output_wrapper = "(function(){%output%}).call(this);")