-
Notifications
You must be signed in to change notification settings - Fork 237
/
Copy pathjs_rules.bzl
100 lines (94 loc) · 4.47 KB
/
js_rules.bzl
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.
# TODO(cjhopman): This was generated by scripts/hacks/rules_shim_with_docs.py,
# but should be manually edited going forward. There may be some errors in
# the generated docs, and so those should be verified to be accurate and
# well-formatted (and then delete this TODO)
load(":common.bzl", "prelude_rule")
js_bundle = prelude_rule(
name = "js_bundle",
docs = "",
examples = None,
further = None,
attrs = (
# @unsorted-dict-items
{
"android_package": attrs.option(attrs.string(), default = None),
"bundle_name": attrs.option(attrs.string(), default = None),
"bundle_name_for_flavor": attrs.list(attrs.tuple(attrs.string(), attrs.string()), default = []),
"contacts": attrs.list(attrs.string(), default = []),
"default_host_platform": attrs.option(attrs.configuration_label(), default = None),
"deps": attrs.list(attrs.dep(), default = []),
"entry": attrs.one_of(attrs.set(attrs.string(), sorted = False), attrs.string()),
"extra_json": attrs.option(attrs.arg(), default = None),
"fallback_transform_profile": attrs.option(attrs.string(), default = None),
"labels": attrs.list(attrs.string(), default = []),
"licenses": attrs.list(attrs.source(), default = []),
"worker": attrs.dep(),
}
),
)
js_bundle_genrule = prelude_rule(
name = "js_bundle_genrule",
docs = "",
examples = None,
further = None,
attrs = (
# @unsorted-dict-items
{
"bash": attrs.option(attrs.arg(), default = None),
"bundle_name": attrs.option(attrs.string(), default = None),
"bundle_name_for_flavor": attrs.list(attrs.tuple(attrs.string(), attrs.string()), default = []),
"cacheable": attrs.option(attrs.bool(), default = None),
"cmd": attrs.option(attrs.arg(), default = None),
"cmd_exe": attrs.option(attrs.arg(), default = None),
"contacts": attrs.list(attrs.string(), default = []),
"default_host_platform": attrs.option(attrs.configuration_label(), default = None),
"enable_sandbox": attrs.option(attrs.bool(), default = None),
"environment_expansion_separator": attrs.option(attrs.string(), default = None),
"js_bundle": attrs.dep(),
"labels": attrs.list(attrs.string(), default = []),
"licenses": attrs.list(attrs.source(), default = []),
"need_android_tools": attrs.bool(default = False),
"remote": attrs.option(attrs.bool(), default = None),
"rewrite_deps_file": attrs.bool(default = False),
"rewrite_misc": attrs.bool(default = False),
"rewrite_sourcemap": attrs.bool(default = False),
"skip_resources": attrs.bool(default = False),
"srcs": attrs.named_set(attrs.source(), sorted = False, default = []),
"weight": attrs.option(attrs.int(), default = None),
}
),
)
js_library = prelude_rule(
name = "js_library",
docs = "",
examples = None,
further = None,
attrs = (
# @unsorted-dict-items
{
"asset_extensions": attrs.option(attrs.set(attrs.string(), sorted = False), default = None),
"asset_platforms": attrs.option(attrs.set(attrs.string(), sorted = False), default = None),
"base_path": attrs.option(attrs.string(), default = None),
"contacts": attrs.list(attrs.string(), default = []),
"default_host_platform": attrs.option(attrs.configuration_label(), default = None),
"deps": attrs.list(attrs.dep(), default = []),
"deps_query": attrs.option(attrs.query(), default = None),
"extra_json": attrs.option(attrs.arg(), default = None),
"labels": attrs.list(attrs.string(), default = []),
"licenses": attrs.list(attrs.source(), default = []),
"srcs": attrs.list(attrs.one_of(attrs.source(), attrs.tuple(attrs.source(), attrs.string())), default = []),
"worker": attrs.dep(),
}
),
)
js_rules = struct(
js_bundle = js_bundle,
js_bundle_genrule = js_bundle_genrule,
js_library = js_library,
)