Skip to content

Commit 033d1a8

Browse files
committed
[js] Use copy_file for mutation listener
This avoids genrule altogether
1 parent af49a5e commit 033d1a8

File tree

1 file changed

+4
-8
lines changed
  • javascript/node/selenium-webdriver/lib/atoms

1 file changed

+4
-8
lines changed

javascript/node/selenium-webdriver/lib/atoms/BUILD.bazel

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary")
2+
load("//common:defs.bzl", "copy_file")
23

34
js_binary(
45
name = "make_atoms_module",
56
data = ["make-atoms-module.js"],
67
entry_point = ":make-atoms-module.js",
78
)
89

9-
# genrules used to copy closure_js_binary outputs to locations
10-
# that will be picked up by the npm_package rule.
11-
1210
js_run_binary(
1311
name = "is_displayed",
1412
srcs = ["//javascript/atoms/fragments:is-displayed.js"],
@@ -36,11 +34,9 @@ js_run_binary(
3634
visibility = ["//javascript/node/selenium-webdriver:__pkg__"],
3735
)
3836

39-
genrule(
37+
copy_file(
4038
name = "mutation-listener",
41-
srcs = ["//javascript/cdp-support:mutation-listener.js"],
42-
outs = ["mutation-listener.js"],
43-
cmd = "mv $(location //javascript/cdp-support:mutation-listener.js) $@",
44-
tools = [],
39+
src = "//javascript/cdp-support:mutation-listener.js",
40+
out = "mutation-listener.js",
4541
visibility = ["//javascript/node/selenium-webdriver:__pkg__"],
4642
)

0 commit comments

Comments
 (0)