Skip to content

Commit

Permalink
[js] Use copy_file for mutation listener
Browse files Browse the repository at this point in the history
This avoids genrule altogether
  • Loading branch information
p0deje committed Mar 25, 2024
1 parent af49a5e commit 033d1a8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions javascript/node/selenium-webdriver/lib/atoms/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary")
load("//common:defs.bzl", "copy_file")

js_binary(
name = "make_atoms_module",
data = ["make-atoms-module.js"],
entry_point = ":make-atoms-module.js",
)

# genrules used to copy closure_js_binary outputs to locations
# that will be picked up by the npm_package rule.

js_run_binary(
name = "is_displayed",
srcs = ["//javascript/atoms/fragments:is-displayed.js"],
Expand Down Expand Up @@ -36,11 +34,9 @@ js_run_binary(
visibility = ["//javascript/node/selenium-webdriver:__pkg__"],
)

genrule(
copy_file(
name = "mutation-listener",
srcs = ["//javascript/cdp-support:mutation-listener.js"],
outs = ["mutation-listener.js"],
cmd = "mv $(location //javascript/cdp-support:mutation-listener.js) $@",
tools = [],
src = "//javascript/cdp-support:mutation-listener.js",
out = "mutation-listener.js",
visibility = ["//javascript/node/selenium-webdriver:__pkg__"],
)

0 comments on commit 033d1a8

Please sign in to comment.